From 8838b71ffa4bc319b3c23e817833674818d11149 Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Tue, 14 Sep 2004 08:28:00 +0000 Subject: [PATCH] - Re-initialize array, otherwise the example spits out: Warning: Invalid argument supplied for foreach() in /tmp/foreach-test.php on line 42 git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@168562 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/control-structures.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/language/control-structures.xml b/language/control-structures.xml index 83680c1d58..a4131d959d 100644 --- a/language/control-structures.xml +++ b/language/control-structures.xml @@ -1,5 +1,5 @@ - + Control Structures @@ -651,7 +651,7 @@ foreach ($a as $k => $v) { } /* foreach example 4: multi-dimensional arrays */ - +$a = array(); $a[0][0] = "a"; $a[0][1] = "b"; $a[1][0] = "y";