note 82761 added to function.array-values
| From: | rene dot zak at post dot cz | Date: | Thu, 24 Apr 2008 20:05:03 +0000 |
| Subject: | note 82761 added to function.array-values | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-138747@lists.php.net to get a copy of this message | ||
<?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
*/
?>
----
Server IP: 147.32.160.17
Probable Submitter: 213.168.178.13
----
Manual Page -- http://www.php.net/manual/en/function.array-values.php
Edit -- https://master.php.net/note/edit/82761
Del: integrated -- https://master.php.net/note/delete/82761/integrated
Del: useless -- https://master.php.net/note/delete/82761/useless
Del: bad code -- https://master.php.net/note/delete/82761/bad+code
Del: spam -- https://master.php.net/note/delete/82761/spam
Del: non-english -- https://master.php.net/note/delete/82761/non-english
Del: in docs -- https://master.php.net/note/delete/82761/in+docs
Del: other reasons-- https://master.php.net/note/delete/82761
Reject -- https://master.php.net/note/reject/82761
Search -- https://master.php.net/manage/user-notes.php