Re: intval

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



if that is the case & should appear before all the other variables as well....

and.....
<?php
function foo(&$val, $key) {
 if(is_numeric($value)) {
               $value = $value + 0;
  }
}
$_POST = array( '1', '100', '100.1', '100.123', 'a');
array_walk_recursive($_POST, 'foo');
var_dump($_POST);
?>

is giving me
array(5) { [0]=>  int(1) [1]=>  int(100) [2]=>  float(100.1) [3]=>
float(100.123) [4]=> string(1) "a" }
ny idea y this difference arises?

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux