note 15978 added to function.array-shift
| From: | rfoley at cmdpdx dot com | Date: | Thu, 11 Oct 2001 02:10:32 +0000 |
| Subject: | note 15978 added to function.array-shift | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-18805@lists.php.net to get a copy of this message | ||
We found a bug with this function.
Take a look.
<?php
$my_array = array("poop","can");
$my_array = array_shift($my_array);
$count = count($my_array);
if ($count > 0) {
$out = implode(".",$my_array);
} else {
$out = "";
}
echo "$out<BR>";
?>
Returns the following result.
Warning: Bad arguments to implode() in /home/ftp/wwwroot/wid_testimplode.php on line 9
--
http://www.php.net/manual/en/function.array-shift.php
http://master.php.net/manage/user-notes.php?action=edit+15978
http://master.php.net/manage/user-notes.php?action=delete+15978
http://master.php.net/manage/user-notes.php?action=reject+15978