Forum Moderators: coopster
I am getting the following error message:
Parse error: parse error, unexpected $ in /blah/blah/blah/blah/error.php on line 40
and the code is:
<?php
include ("includes/check_fields.php");
include ("includes/door_functions.php");
check_fields($style, $colour, $panelType, $height, $width); // Check and validate fields
if ($message!="")
{
echo "$message";
}
else
{
echo's Quantity, Colour, Width, Height, Type,
}
get_best_price($height, $width);//Get best "base price" from Dbase
get_range ($style);//Check which price range to use
calculate_price($range, $best_price);//Calcs actual price
echo $price;
echo $message;
exit;
?>
THIS IS LINE 40
I haven't a clue what I'm looking for, a stray $ character? A string? or something else maybe?
Never the less, I still can't find the problem!
Can someone point me in the right direction, I've tried out most of the error codes in the past, but this is a new one on me!
Thanks in advance.
Spook
echo's Quantity, Colour, Width, Height, Type,
be commented out?
//echo's Quantity, Colour, Width, Height, Type,
when i run a script for the first time and it is a couple hundred lines long and I get an error on the last line.
I usually bang my head on the keyboard a couple times and go for a coffee. You always have to go through the whole file, last changes first and keep going back until you find it.
fun
I didn't make it very clear, the line "echo's Quantity, Colour, Width, Height, Type," is where I deleted a chunk of code to keep the code post as short as possible - sorry.
I've spent most of the day going throught the code but can't spot anything, but its strange how your own mistakes are more difficult to see.
Think I will pass on the coffee and open a bottle of wine instead. Take another look tomorrow.
Thanks
Graham
You were right it was a missing } but it took some finding.
Ironically, in the code I posted above, I spotted the missing brace and replaced it, thinking I had deleted it by mistake whilst "reducing" the code for purpose of the forum.
But why did the error message not say "parse error: missing "}"?
Anyway, panic over, that wine obviously did the trick!
Spook