note 5494 deleted from array_pop by ronabop
| From: | ronabop@php.net | Date: | Sun, 03 Sep 2000 09:36:49 +0000 |
| Subject: | note 5494 deleted from array_pop by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-3997@lists.php.net to get a copy of this message | ||
I don't know if it is a bug, or if it is me who doesn't use this correctly.
I have a range of number separated with
semicolon that comes is as a string-argument ($numbers).
<pre>
$isbn_exploded = explode(";", $numbers);
$isbn_exploded = rsort($isbn_exploded);
$counter = count($isbn_exploded);
for ($trv = $counter-1; $trv > -1; $trv--)
{
if ($isbn_exploded[$trv] < 1)
{
$temp_catch = array_pop($isbn_exploded);
}
}
</pre>
But I get told
Warning: The argument needs to be an array.
Explode returns an array, and the rsort just sort it. Why am I told that my sweet variable
isn't what it's suppose to be?! Anyone!?