sabret00the
06-24-2005, 07:13 PM
// sanitizing array values
foreach($getpiece AS $key => $value)
{
if (!is_numeric($value))
{
if ($key == "pagetext")
{
$getpiece['$key'] = stripslashes(nl2br($getpiece[pagetext]));
}
else
{
$getpiece['$key'] = stripslashes($getpiece['$value']);
}
}
else
{
$getpiece['$key'] = $getpiece['$value'];
}
}
what am i doing wrong?
foreach($getpiece AS $key => $value)
{
if (!is_numeric($value))
{
if ($key == "pagetext")
{
$getpiece['$key'] = stripslashes(nl2br($getpiece[pagetext]));
}
else
{
$getpiece['$key'] = stripslashes($getpiece['$value']);
}
}
else
{
$getpiece['$key'] = $getpiece['$value'];
}
}
what am i doing wrong?