mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
- 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
This commit is contained in:
parent
35f1cd5a99
commit
8838b71ffa
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.107 $ -->
|
||||
<!-- $Revision: 1.108 $ -->
|
||||
<chapter id="language.control-structures">
|
||||
<title>Control Structures</title>
|
||||
|
||||
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue