10-14-2009, 11:44 AM
|
#1 (permalink)
|
|
The Wanderer
Join Date: Aug 2009
Location: Pretoria, South Africa
Posts: 11
Thanks: 0
|
array_map + htmlspecialchars_decode problem
So i'm looking for a way to decode an array containing encoded html special characters, without using a foreach so I used array_map to encode them, why not use it to decode them?
To my dismay after attempting to decode them by using the following
PHP Code:
return array_map('htmlspecialchars_decode', array($aArray, ENT_QUOTES));
I receive a nice error from htmlspecialchars_decode saying that it expects a string and I am trying to give it an array, shouldnt array_map apply the callback function(htmlspecialchars_decode) to all the elements of the specified array? 
|
|
|