Re: Stripslashes through an array.........

From: Date: Mon, 25 Nov 2002 04:04:00 +0000
Subject: Re: Stripslashes through an array.........
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-125873@lists.php.net to get a copy of this message
On Sunday 24 November 2002 20:30, Cookra wrote: > Hi all is it possible to stripslahes from this query? > > > > $results = mysql_query("SELECT * FROM $DB_Table_A ORDER BY name ASC LIMIT > $page, $limit"); > > while ($data = (mysql_fetch_array($results))) > { > //-->< something here would be nice > } Usually, it's not necessary to use stripslashes() on data retrieved from a db. But if you insist ... foreach ($data as $key => $value) { $data[$key] = stripslashes($value); } ... should work. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* spagmumps, n.: Any of the millions of Styrofoam wads that accompany mail-order items. -- "Sniglets", Rich Hall & Friends */

« previous php.general (#125873) next »