[PHP-DEV] PHP 4.0 Bug #10203 Updated: foreach weakness

2001-04-11 Thread jack
ID: 10203 User Update by: [EMAIL PROTECTED] Status: Open Bug Type: Feature/Change Request Description: foreach weakness sure, I know I could use this way but I don't find it nice at all. Previous Comments: --- [2001-04-06

[PHP-DEV] PHP 4.0 Bug #10203 Updated: foreach weakness

2001-04-06 Thread hholzgra
ID: 10203 Updated by: hholzgra Reported By: [EMAIL PROTECTED] Old-Status: Open Status: Feedback Bug Type: Feature/Change Request Assigned To: Comments: and what should it do? i guess you want to have key and value in one step? this is done by the foreach($array as $key = $value)

[PHP-DEV] PHP 4.0 Bug #10203 Updated: foreach weakness

2001-04-06 Thread jack
ID: 10203 User Update by: [EMAIL PROTECTED] Old-Status: Feedback Status: Open Bug Type: Feature/Change Request Description: foreach weakness no, 'list' should assign an array to a list of variables. $arr = array(array(1, 2), array(3, 4)); foreach ($arr as list($a, $b)) echo "$a

[PHP-DEV] PHP 4.0 Bug #10203 Updated: foreach weakness

2001-04-06 Thread torben
ID: 10203 Updated by: torben Reported By: [EMAIL PROTECTED] Status: Open Bug Type: Feature/Change Request Assigned To: Comments: It's for someone else to decide whether to add this to the language, but until they do you can achieve the same effect with: $arr = array(array(1, 2), array(3,