Re: 3d array-number of elements in each dimension

From: Date: Tue, 22 May 2001 21:04:43 +0000
Subject: Re: 3d array-number of elements in each dimension
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-53933@lists.php.net to get a copy of this message
I should clarify that I need to determine the number of elements in $j for each row ($k). Thanks, To reply personally, remove all numbers from address. "Andrew V. Romero" wrote: > I have a 3d array $ingredientsInfoSplit[$i][$j][$k] and this array is > contains $i-row that data (a compounded suspension) was found in, > $j-ingredients for the suspension, and $k-information on each ingredient > used for the suspension. So each row in this file I have contains all > the information needed to make a particular suspension and this array > breaks it down so that I can read each part seperately. First, would > there be a better way to hold this information? This way seems to work > well but I am not an expert yet and was wondering if this is how you > would do it. > > Now for the real question, for each suspension I need to determine how > many ingredients were used to create it. So I need a way to determine > how many $j elements there are in $ingredientsInfoSplit[$i][$j][$k] . I > have been looking at the count function but I can't figure out how I > could use it to determine how many $j elements there are. > > Thanks for any help, > Andrew V. Romero > -Please remove all numbers from address to reply personally.- > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#53933) next »