note 84632 added to function.array-map
| From: | stijnleenknegt at gmail dot com | Date: | Tue, 22 Jul 2008 23:17:11 +0000 |
| Subject: | note 84632 added to function.array-map | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-142575@lists.php.net to get a copy of this message | ||
If you want to pass an argument like ENT_QUOTES to htmlentities, you can do the follow.
<?php
$array = array_map( 'htmlentities' , $array, array_fill(0 , count($array) , ENT_QUOTES) );
?>
The third argument creates an equal sized array of $array filled with the parameter you want to give
with your callback function.
----
Server IP: 195.207.10.20
Probable Submitter: 84.198.174.128
----
Manual Page -- http://www.php.net/manual/en/function.array-map.php
Edit -- https://master.php.net/note/edit/84632
Del: integrated -- https://master.php.net/note/delete/84632/integrated
Del: useless -- https://master.php.net/note/delete/84632/useless
Del: bad code -- https://master.php.net/note/delete/84632/bad+code
Del: spam -- https://master.php.net/note/delete/84632/spam
Del: non-english -- https://master.php.net/note/delete/84632/non-english
Del: in docs -- https://master.php.net/note/delete/84632/in+docs
Del: other reasons-- https://master.php.net/note/delete/84632
Reject -- https://master.php.net/note/reject/84632
Search -- https://master.php.net/manage/user-notes.php