note 99078 added to control-structures.foreach

From: Date: Mon, 26 Jul 2010 15:23:41 +0000
Subject: note 99078 added to control-structures.foreach
Groups: php.notes 
Request: Send a blank email to php-notes+get-171142@lists.php.net to get a copy of this message
I needed something like a "double foreach", which works with two arrays, so there it is: for($counter = 0; ($array1[$counter] != true) and ($array2[$counter] != true); $counter = $counter + 1) { echo($array1[$counter]); echo($array2[$counter]); ... } I didn't find a way, how to do this with the foreach cycle ---- Server IP: 147.32.160.17 Probable Submitter: 89.248.248.94 ---- Manual Page -- http://www.php.net/manual/en/control-structures.foreach.php Edit -- https://master.php.net/note/edit/99078 Del: integrated -- https://master.php.net/note/delete/99078/integrated Del: useless -- https://master.php.net/note/delete/99078/useless Del: bad code -- https://master.php.net/note/delete/99078/bad+code Del: spam -- https://master.php.net/note/delete/99078/spam Del: non-english -- https://master.php.net/note/delete/99078/non-english Del: in docs -- https://master.php.net/note/delete/99078/in+docs Del: other reasons-- https://master.php.net/note/delete/99078 Reject -- https://master.php.net/note/reject/99078 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#171142) next »