Hello,
May i have some helps i m php beginers so in my menu i have 3 children category so i build this
function createSelectCat($current_category, $category_arr) {
//var_dump($category_arr);exit;
foreach($category_arr as $parent)
{
if($current_category==$parent['category_id'])
{
$f = 'selected';
}
else
{
$f = '';
}
echo "<option value='".$parent['category_id']."' ".$f.">".$parent['category_name']."</option>";
if($parent['child']) {
foreach($parent['child'] as $row1) {
if($current_category==$row1['category_id'])
{
$f = 'selected';
}
else
{
$f = '';
}
echo "<option value='".$row1['category_id']."' ".$f."> ".$row1['category_name']."</option>";
}
}
How i may add my 2nd and 3rd child category on this code ?
Thank you for your help