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
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
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
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
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,
5 matches
Mail list logo