Welcome Guest, Not a member yet? Register   Sign In
escaping quotes when updating db
#7

[eluser]murichej[/eluser]
I have one problem using that method. This method changes associative array to non-associative arrays Tongue

edit: ok i wrote method for associative arrays. if somebody needs it, feel free to use it

Code:
/**
* stripslashes for associative arrays
*
* @access public
* @param  array
* @return array
*/
function stripslashes($object)
{
    
   $output = array();
    
   if (is_array($object))
   {
       foreach ($object as $key => $val)        
       {
           $item = stripslashes($val);
           $output[$key] = $item;
       }
   }
    
   return $output;
            
}


Messages In This Thread
escaping quotes when updating db - by El Forum - 09-14-2012, 12:18 PM
escaping quotes when updating db - by El Forum - 09-14-2012, 12:30 PM
escaping quotes when updating db - by El Forum - 09-14-2012, 12:43 PM
escaping quotes when updating db - by El Forum - 09-14-2012, 12:52 PM
escaping quotes when updating db - by El Forum - 09-14-2012, 01:02 PM
escaping quotes when updating db - by El Forum - 09-14-2012, 01:51 PM
escaping quotes when updating db - by El Forum - 09-16-2012, 07:05 AM



Theme © iAndrew 2016 - Forum software by © MyBB