Re: [PHP] Parse error: syntax error, unexpected ',' in

2006-05-23 Thread Mark Sargent
Chris wrote: Since there aren't actually 18 lines this isn't the real code.. true, as I only posted the php code The problem is here: echo $currentValue "\n"; it should be echo $currentValue . "\n"; or echo $currentValue , "\n"; thanx to all. The book is Beginning PHP, Apache, MySQL, We

Re: [PHP] Parse error: syntax error, unexpected ',' in

2006-05-23 Thread Chris
Mark Sargent wrote: Hi All, this code, "; echo "My favourite flavours are:"; foreach ($flavour as $currentValue) { //these lines will execute as long as there is a value in $flavour echo $currentValue "\n"; } ?> gives this, *Parse error*: syntax error, unexpected T_CONS

Re: [PHP] Parse error: syntax error, unexpected ',' in

2006-05-23 Thread Robin Vickery
On 24/05/06, Mark Sargent <[EMAIL PROTECTED]> wrote: Hi All, this code, "; echo "My favourite flavours are:"; foreach ($flavour as $currentValue) { //these lines will execute as long as there is a value in $flavour echo $currentValue "\n"; } ?> gives this, *Parse er

Re: [PHP] Parse error: syntax error, unexpected ',' in

2006-05-23 Thread Stut
Mark Sargent wrote: Hi All, this code, "; echo "My favourite flavours are:"; foreach ($flavour as $currentValue) { //these lines will execute as long as there is a value in $flavour echo $currentValue "\n"; } ?> gives this, *Parse error*: syntax error, unexpected T_CONS

[PHP] Parse error: syntax error, unexpected ',' in

2006-05-23 Thread Mark Sargent
Hi All, this code, "; echo "My favourite flavours are:"; foreach ($flavour as $currentValue) { //these lines will execute as long as there is a value in $flavour echo $currentValue "\n"; } ?> gives this, *Parse error*: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING,