Date: 10/22/98
- Next message: zeev: "[PHP-DEV] CVS update: php3"
- Previous message: ssb: "[PHP-DEV] CVS update: php3/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: zmievski <email protected>
Operating system: Solaris 2.6
PHP version: 3.0.5
PHP Bug Type: Feature/Change Request
Bug description: A new language construct
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
-- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe <email protected> For help: php-dev-help <email protected>
- Next message: zeev: "[PHP-DEV] CVS update: php3"
- Previous message: ssb: "[PHP-DEV] CVS update: php3/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

