note 92194 deleted from function.addslashes by danbrown

From: Date: Mon, 13 Jul 2009 23:31:52 +0000
Subject: note 92194 deleted from function.addslashes by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-158253@lists.php.net to get a copy of this message
Note Submitter: VACOsk ---- according to leocullen's code, i would change it like this: <?php function add_slashes (&$an_array) { foreach ($an_array as $key => $value) { $an_array[$key] = addslashes($an_array[$key]); } } ?> then call it: <?php add_slashes($_POST); ?> so the attribute in function is called by reference and submitted array is changed by add_slashes func.

« previous php.notes (#158253) next »