array_map help

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

 



I've got the following code and I am not doing something right. Either my
function is wrong, or the way Im using array_map is wrong, as slashes are
still making it into the data, and the asdf iosn't getting appended to each
value.

Thanks, Mark



// function to remove stripped slashes
function detectMGQ($value)
{
   // Stripslashes
   if (get_magic_quotes_gpc()) {
       $value = stripslashes($value);
   }
   
    // added in to detect if this function is working
   $value .= $value.'asdf';

   return $value;
}

// construct field and value pairs into array
$field_values	=	array(	'name'		=> "$clean[name]",
						'email'		=>
"$clean[email]",
						'username'		=>
"$clean[username]",
						'accesslevel'	=>
"$clean[accesslevel]",
						'status'		=>
"$clean[status]",
						'password'		=>
base64_encode(rc4($clean[password1])) );
			

// walk through the values and strip out the slashses
$field_values = array_map( "detectMGQ", $field_values );

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