View Single Post
Old 10-14-2009, 11:44 AM   #1 (permalink)
devnull
The Wanderer
 
Join Date: Aug 2009
Location: Pretoria, South Africa
Posts: 11
Thanks: 0
devnull is on a distinguished road
Confused 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($aArrayENT_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?
__________________
~ Work is love made visible ~

Flexible Programming Tips & Tricks
Send a message via Skype™ to devnull
devnull is offline  
Reply With Quote