note 15978 rejected from function.array-shift by zak
| From: | zak@php.net | Date: | Thu, 11 Oct 2001 02:11:48 +0000 |
| Subject: | note 15978 rejected from function.array-shift by zak | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-18806@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