note 82761 deleted from function.array-values by crell

From: Date: Tue, 12 Apr 2022 01:06:27 +0000
Subject: note 82761 deleted from function.array-values by crell
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-218197@lists.php.net to get a copy of this message
Note Submitter: rene dot zak at post dot cz ---- <?php $array = array( 'fruit1' => 'apple', 'fruit2' => 'orange', 'fruit3' => ' ', 'fruit4' => ' ', 'fruit5' => 'apple'); for ($i = 0; $i < count($array); $i++) { $key=key($array); $val=$array[$key]; if ($val<> ' ') { echo $key ." = ". $val ." <br> "; } next($array); } /* fruit1 = apple fruit2 = orange fruit5 = apple */ ?>

« previous php.notes (#218197) next »