Short version:
[code=php]
$data = mysql_query(‘select * blah blah blah’);
if (mysql_num_rows($data) == 1) {
$row = mysql_fetch_array($data);
foreach ($row as ??? => ???) {
apply nl2br on every value
apply strip slashes on every value
}
}
I want to clean up all of the data from a mysql query, but I need the array fetched from the row (the query always returns 1 row) to remain intact… How do I do this. Currently I clean up each value individually, which is stupid since I spent a lot of time trying to structure the pages so the row can be manipulated in a single place, not 10 places.
I would really appreciate any help offered. Is it possible to apply nl2br/strip_slashes to an array in it’s entirety?