From 2ad4a19e40d29514771b9c6911fa88ebfcea2172 Mon Sep 17 00:00:00 2001 From: Gabor Hojtsy Date: Tue, 10 Jul 2001 12:29:36 +0000 Subject: [PATCH] Some ugly errors corrected (eg. comment without an end, constant definition, do..while added to the break list, etc.) git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@51066 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/control-structures.xml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/language/control-structures.xml b/language/control-structures.xml index cf604db56e..855680d9e1 100644 --- a/language/control-structures.xml +++ b/language/control-structures.xml @@ -576,7 +576,7 @@ foreach($a as $v1) { } } -/* foreach example 5: dynamic arrays +/* foreach example 5: dynamic arrays */ foreach(array(1, 2, 3, 4, 5) as $v) { print "$v\n"; @@ -590,8 +590,9 @@ foreach(array(1, 2, 3, 4, 5) as $v) { <literal>break</literal> break ends execution of the current - for, while, - foreach or switch structure. + for, foreach + while, do..while or + switch structure. break accepts an optional numeric argument @@ -827,8 +828,8 @@ endswitch; <literal>declare</literal> - The declare construct is used to is - used to set execution directives for a block of code. + The declare construct is used to + set execution directives for a block of code. The syntax of declare is similiar to the syntax of other flow control constructs: @@ -1278,7 +1279,7 @@ include ("file.php"); /* Works. */ utils.inc <?php -define(PHPVERSION, floor(phpversion())); +define("PHPVERSION", floor(phpversion())); echo "GLOBALS ARE NICE\n"; function goodTea() { return "Oolong tea tastes good!";