![]() |
How do I get a category name from the categoryid?
I'm trying to create a page where I can see all of a products categories, and change and modify as necessary. I have a copy of the search.php and made the necessary changes so it calls new templates that are solely in the admin area. It is pulling the category ids from the products table, and displaying them at the top of a drop down box with all of the categories in, but when it displays, it is just the category number, as this is what is held in the products table. This is the code I have:
Code:
<td height="10"> I tried assigning a variable called catid with the value $products[cat_num].categoryid1 and then using Code:
but that just displayed nothing, Can anyone tell me how I can display the category name. Thanks Amy |
I did it:
Code:
<option value="{$products[cat_num].categoryid}">{$products[cat_num].category}</option> Why do you always work it out just AFTER you post!!! (Maybe the nights sleep helped though!) |
however it only works with the main category, not cats 1-3,
still working on this |
All times are GMT -8. The time now is 09:21 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.