Undefined Constant error Anybody Help?

From: Date: Sat, 03 Aug 2002 20:27:47 +0000
Subject: Undefined Constant error Anybody Help?
Groups: php.windows 
Request: Send a blank email to php-windows+get-15109@lists.php.net to get a copy of this message
Can anyone tell me why the following php code produces the errors below $products = array(array(Code => "TIR", Description => "Tires", price => 100), array (Code => "OIL", Description => "Oil", price => 10), array (Code => "SPK", Description => "Spark Plugs", price => 4) ); for ($row = 0; $row < 3; $row++) { while (list($key, $value) = each ($products[$row])) { echo "|$value"; } echo "|<br>"; } ERROR RESULTS Warning: Use of undefined constant Code - assumed 'Code' in c:/apache/apache/htdocs/www/testsite/multiarray.php on line 24 Warning: Use of undefined constant Description - assumed 'Description' in c:/apache/apache/htdocs/www/testsite/multiarray.php on line 24 Warning: Use of undefined constant price - assumed 'price' in c:/apache/apache/htdocs/www/testsite/multiarray.php on line 24 Warning: Use of undefined constant Code - assumed 'Code' in c:/apache/apache/htdocs/www/testsite/multiarray.php on line 25 Warning: Use of undefined constant Description - assumed 'Description' in c:/apache/apache/htdocs/www/testsite/multiarray.php on line 25 Warning: Use of undefined constant price - assumed 'price' in c:/apache/apache/htdocs/www/testsite/multiarray.php on line 25 Warning: Use of undefined constant Code - assumed 'Code' in c:/apache/apache/htdocs/www/testsite/multiarray.php on line 26 Warning: Use of undefined constant Description - assumed 'Description' in c:/apache/apache/htdocs/www/testsite/multiarray.php on line 26 Warning: Use of undefined constant price - assumed 'price' in c:/apache/apache/htdocs/www/testsite/multiarray.php on line 26

« previous php.windows (#15109) next »