From: Sam Ruby Date: Sun, 21 May 2000 11:26:26 +0000 (+0000) Subject: use simpler foreach instead of while X-Git-Tag: php-4.0.0~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=767ea7a7e4a94afdabc8088e9083eb8ff1598a0c;p=php use simpler foreach instead of while --- diff --git a/sapi/servlet/cookies.php b/sapi/servlet/cookies.php index 21c765c8a8..bcc4c40aae 100644 --- a/sapi/servlet/cookies.php +++ b/sapi/servlet/cookies.php @@ -16,7 +16,7 @@ } else { echo "Your browser is sending the following cookies:
\n"; - while (list($i,$cookie) = each($cookies)) { + foreach ($cookies as $cookie) { echo "Cookie Name: $cookie->name
Cookie value: $cookie->value
\n"; } }