Re: Arrays within arrays question

From: Date: Wed, 28 Aug 2002 13:46:03 +0000
Subject: Re: Arrays within arrays question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-114360@lists.php.net to get a copy of this message
I always put an if(is_array($var)) to check if an array was actually return. On Wednesday, August 28, 2002, at 04:49 AM, Jean-Christian Imbeault wrote:
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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --
Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577

« previous php.general (#114360) next »