Re: Arrays within arrays question

From: Date: Wed, 28 Aug 2002 08:49:36 +0000
Subject: Re: Arrays within arrays question
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-114337@lists.php.net to get a copy of this message
Jason Wong wrote:
If $aProds can contain more than 1 item then what you're doing now is correct.
Thanks. The problem was that I was doing this: $return[] = get_array_of_prods(); the [] was creating the extra array level ... The problem I now face is that foreach keeps crapping out if I pass it an "unitialized" (i.e. has no value) array. Foreach is happy with empty arrays but not arrays that have not been assigned anything yet ... Jc

« previous php.general (#114337) next »