note 75077 added to function.chop
| From: | anon at mailinator dot com | Date: | Fri, 11 May 2007 08:06:54 +0000 |
| Subject: | note 75077 added to function.chop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-126403@lists.php.net to get a copy of this message | ||
Another possible one would be to use this:
<?php
function chup(){
$ar=Array();
foreach(func_get_args() as $b) {
push($ar,$b[strlen($b)-1]);
&$b[strlen($b)-1]='';
}
return $ar;
}
?>
If you wanted to perl-chop a va list of strings and return the removed chars. Obviously you can
easily mod it for va list arrays of strings and the like.
----
Server IP: 69.147.83.197
Probable Submitter: 89.243.104.82
----
Manual Page -- http://www.php.net/manual/en/function.chop.php
Edit -- https://master.php.net/note/edit/75077
Del: integrated -- https://master.php.net/note/delete/75077/integrated
Del: useless -- https://master.php.net/note/delete/75077/useless
Del: bad code -- https://master.php.net/note/delete/75077/bad+code
Del: spam -- https://master.php.net/note/delete/75077/spam
Del: non-english -- https://master.php.net/note/delete/75077/non-english
Del: in docs -- https://master.php.net/note/delete/75077/in+docs
Del: other reasons-- https://master.php.net/note/delete/75077
Reject -- https://master.php.net/note/reject/75077
Search -- https://master.php.net/manage/user-notes.php