Re: Recursion to sanitize user input

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

 



* Thus wrote Yoed Anis:
> Simple your code should look like this:
> 
> ...
>     if ( is_array($userInput) )
>     {
>         foreach ( $userInput as $key => $value )
>         {
>             return sanitize( $value ); //<-------- needed to return it or
> else its not recurssive

This is wrong, only the first item of each array will ever be seen.



Curt
-- 
The above comments may offend you. flame at will.

-- 
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