note 49784 added to control-structures.foreach

From: Date: Tue, 08 Feb 2005 17:21:16 +0000
Subject: note 49784 added to control-structures.foreach
Groups: php.notes 
Request: Send a blank email to php-notes+get-84676@lists.php.net to get a copy of this message
* foreach example 4: multi-dimensional arrays */ $a = array(); $a[0][0] = "a"; $a[0][1] = "b"; $a[1][0] = "y"; $a[1][1] = "z"; foreach ($a as $v1) { foreach ($v1 as $v2) { echo "$v2\n"; } } this snipett of code is not working on my server ? whats could be the problem . it use to work properly . PHP : 4.3.10 out put : Array Array Array Array ---- Manual Page -- http://www.php.net/manual/en/control-structures.foreach.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49784 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49784&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49784&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49784&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49784&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49784&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49784&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#84676) next »