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. Quote Link to comment 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); Quote Link to comment Share on other sites More sharing options...
felipeebs Posted July 20, 2008 Author Share Posted July 20, 2008 Thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.