Code: Select all
<?php
for($i=0; $i<40; $i++)
{
if ($bob[$i] != '0')
$foo[$i] = $bob[$i];
}
?>maybe I should just do something where a switch statement asks if Case ' > 0' to do something... i'll have to look that up.
?>
Moderator: General Moderators
Code: Select all
<?php
for($i=0; $i<40; $i++)
{
if ($bob[$i] != '0')
$foo[$i] = $bob[$i];
}
?>Code: Select all
foreach($array as $key=>$element)
if($element==0)
unset($array[$key]);