On Sat, 2009-05-09 at 21:23 +0530, kranthi wrote:
> k i ended up with this code....
>
> <?php
>
> $_POST = array( '1', '100', '100.1', '100.123', 'a');
>
> foreach( $_POST as &$value )
> {
> if(is_numeric($value)) {
> $value = $value + 0;
> }
> }
> var_dump($_POST);
>
> ?>
>
> its giving me
> array(5) { [0]=> int(1) [1]=> int(100) [2]=> float(100.1) [3]=>
> float(100.123) [4]=> &string(1) "a" }
> what does &string mean ??
Maybe because you assigned values from $_POST to $value with the reference
operator?
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php