[SOLVED] Array Question ( should be simple )
Posted: Wed Nov 19, 2003 5:42 pm
Ok, I was wondering. Is there anyway you can call to check if an array has a certain value ( such as NULL or 0 ), to delete that array from your list, so that you are just retaining the arrays with values != what you specify ? I've looked with array_filter and array_search, but i can't seem to do what I am wanting.. Any help on this would be appreciated.
see, i know I can do something like that, but i'd rather not have to define another array, as it just slows the code down...
maybe I should just do something where a switch statement asks if Case ' > 0' to do something... i'll have to look that up.
?>
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.
?>