#30612 [Opn->Bgs]: control-structures.foreach de: syntax error

From: Date: Fri, 29 Oct 2004 10:55:09 +0000
Subject: #30612 [Opn->Bgs]: control-structures.foreach de: syntax error
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969364722@lists.php.net to get a copy of this message
ID: 30612 Updated by: derick@php.net Reported By: andreas at windischer dot at -Status: Open +Status: Bogus Bug Type: Documentation problem PHP Version: Irrelevant New Comment: Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Of course this is going to give a parse error, you have broken code. Previous Comments: ------------------------------------------------------------------------ [2004-10-29 12:39:59] andreas at windischer dot at Description: ------------ "}" after "?>"-Tag Reproduce code: --------------- <?php $arr = array("eins", "zwei", "drei"); reset ($arr); while (list(, $value) = each ($arr)) { echo "Wert: $value<br />\n"; } foreach ($arr as $value) { echo "Wert: $value<br />\n"; ?> } Expected result: ---------------- <?php $arr = array("eins", "zwei", "drei"); reset ($arr); while (list(, $value) = each ($arr)) { echo "Wert: $value<br />\n"; } foreach ($arr as $value) { echo "Wert: $value<br />\n"; } ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30612&edit=1

« previous php.doc (#969364722) next »