TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Advanced PHP Programming (http://www.talkphp.com/advanced-php-programming/)
-   -   array_map + htmlspecialchars_decode problem (http://www.talkphp.com/advanced-php-programming/5026-array_map-htmlspecialchars_decode-problem.html)

devnull 10-14-2009 11:44 AM

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? :-$


All times are GMT. The time now is 05:07 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0