function for $array

From: Date: Thu, 20 Mar 2003 23:30:46 +0000
Subject: function for $array
Groups: php.general 
Request: Send a blank email to php-general+get-140508@lists.php.net to get a copy of this message
I want to use the following function the test the array elements, if all element is number return true, otherwise false; but the command marked, it print out only the first char of every strings in the array; can help? ie: ++0++ for 0.234 function check_int_float($array){ $result=true; for($i=0; $i<sizeof($array); $i++){ echo "++".$array[$i]."++"; <<<================== if($array[$i]!=""){ if(is_numeric($array[$i])){ $result=true; }else{ $result=false; break; }//if }//if }//foreach return $result; } -- Sincerely your; pei_world ( .::IT::. )

« previous php.general (#140508) next »