View Single Post
Old 06-28-2008, 03:24 PM   #2 (permalink)
drewbee
The Acquainted
 
drewbee's Avatar
 
Join Date: May 2008
Posts: 175
Thanks: 9
drewbee is on a distinguished road
Default

Procedural:

PHP Code:
function cleanGlobal(&$var$key null)
{
    if(
is_array($var))
    { 
        
array_walk_recursive($var'cleanGlobal');
    } 
    else 
    {
        
// How do you want each variable handled?
        
$var trim(stripslashes(($var)); 
    }
}
 
if (
count($_POST) > 0)
{
    
array_walk_recursive($_POST'cleanGlobal');

__________________
There are No Stupid Questions. But there a LOT of Inquisitive Idiots.

Last edited by drewbee : 07-07-2008 at 03:27 PM.
Send a message via AIM to drewbee
drewbee is offline  
Reply With Quote