Re: Empty elements in array

From: Date: Tue, 01 Aug 2000 01:34:23 +0000
Subject: Re: Empty elements in array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-9332@lists.php.net to get a copy of this message
> I have five elements in an array, and I have a while loop acting on the > array. However, I only want the non-empty elements to be processed by the > while loop - how do I tell it to ignore the empty elements? > > Thanks in advance for any help... :o) while(list(,$v)=each($array)) { if($v) { do something } } -Rasmus

« previous php.general (#9332) next »