|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-06-01 15:21 UTC] jim at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 06:00:01 2025 UTC |
Suggestion: A construct that will iterate through several arrays at once, making current values for each one available inside the loop. Example: $ProjectID = array("ID001", "ID002", "ID003"); $ProjectName = array("Name1", "Name2", "Name3"); $ProjectManager = array("joe", "bob", "ted"); loop($ProjectID, $ProjectName, $ProjectManager) { echo "$ProjectName ($ProjectID) - $ProjectManager<br>\n"; } This will print out: Name1 (ID001) - joe Name2 (ID002) - bob Name2 (ID003) - ted This could be extended to allow skip and max values, similar to LIMIT in MySQL. loop(skip=1, max=2; $ProjectID, $ProjectName, $ProjectManager)' { .... } Andrey