[PHP] Stripslashes through an array.........

2002-11-24 Thread Cookra
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
}


Thanks..



Regards

R



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Stripslashes through an array.........

2002-11-24 Thread Jason Wong
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
*/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php