Problem with foreatch()

From: Date: Sun, 16 Jan 2005 15:20:26 +0000
Subject: Problem with foreatch()
Groups: php.general 
Request: Send a blank email to php-general+get-206482@lists.php.net to get a copy of this message
I have the following Code: foreatch( $_POST["mtype"] as $akey => $avalue ) { echo "$akey, $avalue<br>"; } When I run it I get: Parse error: parse error, unexpected T_AS in /var/www/mb/mb_estab_update.php on line 58 58 is the line with the foreatch on it. However if I replace it with: print_r( $_POST["mtype"] ); I get: Array ( [1] => RESTAURANT [2] => BEVERAGEWINE [3] => MAIN ) so the array is populated, what am I doing Wrong? Regards, Ben -- Ben Edwards - Poole, UK, England If you have a problem sending me email use this link http://www.gurtlush.org.uk/profiles.php?uid=4 (email address this email is sent from may be defunct)

Attachment: [application/pgp-signature] This is a digitally signed message part signature.asc
« previous php.general (#206482) next »