note 88882 added to function.array-walk
| From: | eblejr at phrebh dot com | Date: | Thu, 12 Feb 2009 03:58:39 +0000 |
| Subject: | note 88882 added to function.array-walk | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-150550@lists.php.net to get a copy of this message | ||
To peterzuzek AT gmail DOT com:
The simpler way is to just write a wrapper function for the built-in PHP function.
For example, I have one to trim the white space from all of the values of an array.
<?
function trim_value(&$value){
//removes whitespace from value
$value = trim($value);
}
?>
This works well and is certainly less cumbersome than reinventing the wheel.
----
Server IP: 209.41.74.194
Probable Submitter: 173.20.205.193
----
Manual Page -- http://www.php.net/manual/en/function.array-walk.php
Edit -- https://master.php.net/note/edit/88882
Del: integrated -- https://master.php.net/note/delete/88882/integrated
Del: useless -- https://master.php.net/note/delete/88882/useless
Del: bad code -- https://master.php.net/note/delete/88882/bad+code
Del: spam -- https://master.php.net/note/delete/88882/spam
Del: non-english -- https://master.php.net/note/delete/88882/non-english
Del: in docs -- https://master.php.net/note/delete/88882/in+docs
Del: other reasons-- https://master.php.net/note/delete/88882
Reject -- https://master.php.net/note/reject/88882
Search -- https://master.php.net/manage/user-notes.php