
April 10th, 2003, 04:05 PM
|
|
|
|
Join Date: Apr 2007
Location: BROOKLYN, NY
Posts: 23
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
multi dimen. arrays tutorial probs
So i copied the multi dim array tutorial code and put it into my own php
php Code:
Original
- php Code |
|
|
|
<?PHP $books = array(0=>array ('name'= 'A Book', 'price'=> 9. 99), 1=>array ('name'= 'Another Book', 'price'=> 17. 99)); ?> <?PHP $books[0]['price'] = 12.99; foreach($books as $onebook) { echo $onebook['name'] . " sells for $". $onebook['price'] . "<BR>n"; } ?>
and I keep getting
Parse error: parse error, expecting `')'' in line 2 (the $books array line)
what is going wrong?
ps.. is there any way to make the php code on this site NOT have invisible characters embedded? Anytime I copy + paste I always end up having to retype everything..
|