Ok a few days ago I got on here how to loop through posts with foreach. Can I loop through an array like that? With the post loop and addslashes I am able to put things in the database fine but they don't come out right in text input fields (but okay in textareas) so I need to use stripslashes. I have thise code that isn't working.
$row = mysql_fetch_array($result);
foreach($row as $key => $value)
{
$row[key] = stripslashes($row[key]);
}
I get a parse error on the $row[key] = line which probably means the real error is on the foreach line. Can someone help please? Thx!
PS: I know about while($row = mysql_fetch_array) but that won't work here since I am not going to post every single thing from the table and they are not all displayed same way.