note 92194 added to function.addslashes

From: Date: Mon, 13 Jul 2009 23:27:43 +0000
Subject: note 92194 added to function.addslashes
Groups: php.notes 
Request: Send a blank email to php-notes+get-158252@lists.php.net to get a copy of this message
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. ---- Server IP: 217.73.17.12 Probable Submitter: 95.105.144.87 ---- Manual Page -- http://www.php.net/manual/en/function.addslashes.php Edit -- https://master.php.net/note/edit/92194 Del: integrated -- https://master.php.net/note/delete/92194/integrated Del: useless -- https://master.php.net/note/delete/92194/useless Del: bad code -- https://master.php.net/note/delete/92194/bad+code Del: spam -- https://master.php.net/note/delete/92194/spam Del: non-english -- https://master.php.net/note/delete/92194/non-english Del: in docs -- https://master.php.net/note/delete/92194/in+docs Del: other reasons-- https://master.php.net/note/delete/92194 Reject -- https://master.php.net/note/reject/92194 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#158252) next »