[PHP] Re: number function

2003-03-20 Thread pei_world
hi
thx for the last question
I have following function, I use it the check all the elements in the array
whether numeric or not. but I get the output : ++l++* and ++0++, the first
char in the string
===
 function check_int_float($array){
  $result=true;

   for($i=0; $isizeof($array); $i++){
 echo ++.$array[strlen($array)].++;
if($array[$i]!=){
  if(isdigit($array[$i])  $array[$i]!=.){
  $result=true;
 }else{
  $result=false;
   break;
  }//if
}//if
}//foreach
 return $result;
 }



--
Sincerely your;

pei_world ( .::IT::. )



Pei_world [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 anyone how to write a good number valid function?
 regonise numbers like: real int





 --
 Sincerely your;

 pei_world ( .::IT::. )










-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: number function

2003-03-20 Thread Kevin Waterson
This one time, at band camp,
pei_world [EMAIL PROTECTED] wrote:

php
$num = '1234';
if(checkNum($num) == 'FALSE')
  {
  echo 'Number is not numeric'
  }
else
  {
  echo 'Its a number';
  }

function checkNum($num){
  return is_numeric($num);
}

 hi
 thx for the last question
 I have following function, I use it the check all the elements in the array
 whether numeric or not. but I get the output : ++l++* and ++0++, the first
 char in the string
 ===
  function check_int_float($array){
   $result=true;
 
for($i=0; $isizeof($array); $i++){
  echo ++.$array[strlen($array)].++;
 if($array[$i]!=){
   if(isdigit($array[$i])  $array[$i]!=.){
   $result=true;
  }else{
   $result=false;
break;
   }//if
 }//if
 }//foreach
  return $result;
  }

-- 
 __  
(_ \ 
 _) )            
|  /  / _  ) / _  | / ___) / _  )
| |  ( (/ / ( ( | |( (___ ( (/ / 
|_|   \) \_||_| \) \)
Kevin Waterson
Port Macquarie, Australia

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php