Hello!
What I am trying to do is display a list of categories and another list of brands.
CategoryList : class
BrandList : class
I am getting only the list of classes displayed. Can anyone tell me what is wrong with my code..
<?php
$obj = new CategoryList();
if (method_exists($obj, 'init'))
{
$obj->init();
}
for($i = 0;$i< count($obj->mCategory); $i++)
{
echo "<a href=''>";
echo $obj->mCategory[$i]['name']. "<br/>";
echo "</a>";
}
$obj2 = new BrandList();
if (method_exists($obj2, 'init'))
{
$obj2->init();
}
for($i = 0;$i< count($obj2->mBrand); $i++)
{
echo "<a href=''>";
echo $obj2->mBrand[$i]['name']. "<br/>";
echo "</a>";
}
?>
Thanks
:)