can anyone please tell me what does this script do ?? if($child['cat_id'] != $child['cat_parent']) { $count = count($child)-1; for ($i = 0; $i < $count; $i++) { if ($i == 0) { $ii[] = $i; } } $iii = count($ii); if ($count == $iii) { $add = ' '; } else { $add = '|'; } } PHP: please?
if($child['cat_id'] != $child['cat_parent']) { $count = count($child)-1; for ($i = 0; $i < $count; $i++) { if ($i == 0) { $ii[] = $i; } } $iii = count($ii); if ($count == $iii) { $add = ' '; } else { $add = '|'; } } PHP: Indented like this, it's a bit easier to read. But still, I have no idea what it's for
it is for counting the number of names echoed in <option> collected from mysql database's table. i can understand the first part, but not rest of it. i can see it is: if $child['cat_id'] isnt $child['cat_parent'] (which means, if the current echoed name isnt a parent) then do the rest of code.. which is the part i cant understand. so, can anyone help me ??