note 75885 modified in function.is-array by danbrown
| From: | danbrown@php.net | Date: | Sat, 27 Dec 2008 16:53:41 +0000 |
| Subject: | note 75885 modified in function.is-array by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-148572@lists.php.net to get a copy of this message | ||
If You want to del all slashes from database query result , try this function:
<?php
function no_slashes($array)
{
foreach($array as $key=>$value)
{
if(is_array($value))
{
$value=no_slashes($value);
$array_temp[$key]=$value;
}
else
{
$array_temp[$key]=stripslashes($value);
}
}
return $array_temp;
}
?>
--was--
If You want to del all slashes from database query result , try this function:
function no_slashes($array)
{
foreach($array as $key=>$value)
{
if(is_array($value))
{
$value=no_slashes($value);
$array_temp[$key]=$value;
}
else
{
$array_temp[$key]=stripslashes($value);
}
}
return $array_temp;
}
http://php.net/manual/en/function.is-array.php