Re: array count()

From: Date: Tue, 11 Jul 2000 13:13:03 +0000
Subject: Re: array count()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-5909@lists.php.net to get a copy of this message
On Mon, 10 Jul 2000, Brad Sacks wrote: > I have an record set from a MySql database; > $record = mysql_fetch_array($result); > I want to be able to count the number of elements inside that have the > same key. Like $record["blah"]; > I want to know how many record blahs there are in the record set. I hope > someone out there can help. I used $num = count($record["advoc"]); but I > new it was wrong and it returned 1. when there are 12 records. I've been > pouring over the manual for an hour. An array can have only one element under a certain key. Perhaps, you could rephrase your question to tell us what you really want? -Andrei * Think digital, act analog. *

« previous php.general (#5909) next »