Re: [videopixel] Category Menu duplicate names problem
I think we have a pretty easy fix here.
First thing we're going to do is set up an array of all of the categories in the database. Put this code somewhere near the top of your file:
<?php
list($categoryRecords,$categoryMetaData) = getRecords(array(
'tableName' => 'categories',
));
$numToName=array();
foreach($categoryRecords as $record){
$numToName[$record['num']]=$record['name'];
}
?>
Next, where you want to output the name of the category, use the following:
echo $numToName[$record['category']]
This should output the category name instead of the number. Give that a try and let me know if it works.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/