note 91523 added to function.array-map
| From: | galenjr at gmail dot com | Date: | Mon, 15 Jun 2009 06:19:50 +0000 |
| Subject: | note 91523 added to function.array-map | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-156867@lists.php.net to get a copy of this message | ||
Another way to array_map htmlentities with a specific quote style is to create a function that does
it and map that function
<?php
function map_entities( $str ) {
return htmlentities( $str, ENT_QUOTES );
}
$good_array = array_map ( 'map_entities', $bad_array );
?>
----
Server IP: 209.41.74.194
Probable Submitter: 67.189.142.80
----
Manual Page -- http://www.php.net/manual/en/function.array-map.php
Edit -- https://master.php.net/note/edit/91523
Del: integrated -- https://master.php.net/note/delete/91523/integrated
Del: useless -- https://master.php.net/note/delete/91523/useless
Del: bad code -- https://master.php.net/note/delete/91523/bad+code
Del: spam -- https://master.php.net/note/delete/91523/spam
Del: non-english -- https://master.php.net/note/delete/91523/non-english
Del: in docs -- https://master.php.net/note/delete/91523/in+docs
Del: other reasons-- https://master.php.net/note/delete/91523
Reject -- https://master.php.net/note/reject/91523
Search -- https://master.php.net/manage/user-notes.php