felipeebs Posted July 20, 2008 Share Posted July 20, 2008 Hello. Can I use a function like htmlentities($str, ENT_NOQUOTES) inside an array_map function? How wouk]ld it look like? Thank's. Link to comment https://forums.phpfreaks.com/topic/115690-solved-array_map-newbie-question/ Share on other sites More sharing options...
JasonLewis Posted July 20, 2008 Share Posted July 20, 2008 Yeah, like so: $array = array("<br>HTML","<a href='something.html'>Hello</a>"); function entities($a){ return htmlentities($a, ENT_NOQUOTES); } $map = array_map("entities",$array); Link to comment https://forums.phpfreaks.com/topic/115690-solved-array_map-newbie-question/#findComment-594780 Share on other sites More sharing options...
felipeebs Posted July 20, 2008 Author Share Posted July 20, 2008 Thank you! Link to comment https://forums.phpfreaks.com/topic/115690-solved-array_map-newbie-question/#findComment-594781 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.