Bug #870: A new language construct
| From: | zmievski at ispi dot net | Date: | Thu, 22 Oct 1998 20:08:56 +0000 |
| Subject: | Bug #870: A new language construct | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-1976@lists.php.net to get a copy of this message | ||
From: zmievski@ispi.net
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@lists.php.net
For help: php-dev-help@lists.php.net