Re: strange problem with count()

From: Date: Mon, 30 Oct 2006 16:05:52 +0000
Subject: Re: strange problem with count()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-243888@lists.php.net to get a copy of this message
At 1:27 PM +0100 10/29/06, Gunnar Beushausen wrote:
Hi! I've a strange problem with count. I wrote a routine to jump to the last position of an array. The code ist this:
-snip- Gunnar: I find it wise to check out all the built-in array functions before starting to write something myself -- there are a lot of them including what you just tried to write. Also, in your code you pushed $this->result and then were surprised when count($this->result) gave you a value of 1 -- just how many $this->result's were you thinking you pushed? You're not using count() correctly. tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.com

« previous php.general (#243888) next »