I’m using some php functions for security.
function whileToArray($qr)
{
while($rs = mysql_fetch_assoc($qr))
{
$data[] = $rs;
}
$data = array_map('htmlspecialchars_decode',$data);
$data = array_map('htmlentities',$data);
return $data;
}
When i running this code, I get;
Warning: htmlspecialchars_decode() expects parameter 1 to be string, array given in C:\AppServ\www\bigbeng\classes\get.class.php on line 22
Warning: htmlspecialchars_decode() expects parameter 1 to be string, array given in C:\AppServ\www\bigbeng\classes\get.class.php on line 22
print_r($data):
Array ( [0] => Array ( [kategori_id] => 1 [kategori_adi] => Spor )
[1] => Array ( [kategori_id] => 2 [kategori_adi] => Siyaset ) )
How can i use these functions with array?
array_mapworks with 1D array not on multidimensional array. so try with below functionthen call