]> granicus.if.org Git - php/commitdiff
use simpler foreach instead of while
authorSam Ruby <rubys@php.net>
Sun, 21 May 2000 11:26:26 +0000 (11:26 +0000)
committerSam Ruby <rubys@php.net>
Sun, 21 May 2000 11:26:26 +0000 (11:26 +0000)
sapi/servlet/cookies.php

index 21c765c8a830aad2ad54198ee695971bb45c06a9..bcc4c40aaecaa398c0f64a225942ac7ab17e2ea3 100644 (file)
@@ -16,7 +16,7 @@
   } else {
     echo "Your browser is sending the following cookies:<br>\n";
 
-    while (list($i,$cookie) = each($cookies)) {
+    foreach ($cookies as $cookie) {
       echo "Cookie Name: $cookie->name<br>Cookie value: $cookie->value<br>\n";
     }
   }