note 19058 added to function.call-user-func-array
| From: | graham dot NO_SPAM at rbd-concepts dot NOSPAM dot co dot uk | Date: | Thu, 14 Feb 2002 10:30:37 +0000 |
| Subject: | note 19058 added to function.call-user-func-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-26605@lists.php.net to get a copy of this message | ||
in case you want to use call_user_func_array for a 0 length array you should change the part to
strip off the last comma, from:
$funcCall = substr($funcCall, 0, -1);
to:
if (sizeof($ar)>0) {
// Strip off last comma ','
$funcCall = substr($funcCall, 0, -1);
}
--
http://www.php.net/manual/en/function.call-user-func-array.php
http://master.php.net/manage/user-notes.php?action=edit+19058
http://master.php.net/manage/user-notes.php?action=delete+19058
http://master.php.net/manage/user-notes.php?action=reject+19058