note 13688 added to function.stripslashes.php

From: Date: Fri, 29 Jun 2001 01:07:25 +0000
Subject: note 13688 added to function.stripslashes.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-14765@lists.php.net to get a copy of this message
In case you're wondering how to strip slashes on all the elements in an array: function stripslashes_array($arr = array()) { $rs = array(); while (list($key,$val) = each($arr)) { $rs[$key] = stripslashes($val); } return $rs; } Very useful for using on all the elements in say $HTTP_POST_VARS, or elements returned from an database query. (to addslashes, just change strip to add =) http://www.php.net/manual/en/function.stripslashes.php

« previous php.notes (#14765) next »