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 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php