1
Mazar
How to get category name using id from other table
  • 2009/10/14 8:29

  • Mazar

  • Not too shy to talk

  • Posts: 191

  • Since: 2009/1/4 0


I have been trying lot of method i used to use php foriegn function to get the name from other table using id as key. but not understanding in XOOPS tried lot but failed to get

I have this ids as array
$topic_arr[$i]->getVar("topic_cid")


trying something lke this
$categoriesHandler =& xoops_getModuleHandler('topic_categories''topics');
$cid $topic_arr[$i]->getVar("topic_cid");
foreach(
$cid as $key)
{
 
$objs $categoriesHandler->getObjects($key);
}
foreach(
$objs as $obj){
if(
$topic_arr[$i]->getVar("topic_cid")== $obj->getVar('categories_id')){
print 
$obj->getVar('category_name');
}

Login

Who's Online

139 user(s) are online (86 user(s) are browsing Support Forums)


Members: 0


Guests: 139


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits