Page 1 of 1

Newbie needs help: keep getting errors

Posted: Mon Oct 09, 2006 11:53 pm
by daweller
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Well it used to say syntax error, but now I get the following error code: parse error: syntax error, unexpected T_STRING in /home/wwwlost/public_html/pages/S01E05.php on line 30

The code for my page is:

Code: Select all

<?php

// header stuff

$headvars['TITLE']="Lost - Walkabout: Season 1, Episode 4 ";
$headvars['DESCRIPTION']="A recap of the third episode of the first season";
$headvars['KEYWORDS']="Walkabout, lost series 1, episode 4";
$headvars['ROBOTS']="index,follow";

//content stuff
$pagevars['HEADING']='Episode Recap: Walkabout';
$pagevars['CONTENT']='<br><script type="text/javascript"><!--
google_ad_client = "pub-4785379591247620";
google_ad_width = 336;
google_ad_height = 280;
google_ad_format = "336x280_as";
google_ad_type = "text";
//2006-10-07: Lost
google_ad_channel ="5888187275";
google_color_border = "000000";
google_color_bg = "000000";
google_color_link = "FFFFFF";
google_color_text = "FFFFFF";
google_color_url = "FFFFFF";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><p>Jack is having a flashback, but Charlie disrupts this flashback by screaming for help. It appears that Boone is drowning! Jack jumps into hero-mode and dives into the water to save Boone. Everything seems fine, until Boone says " Did you get her? ". So this implies that someone else is in the water and needs saving.
Meanwhile, back at the beach, the survivors are having problems of their own. Their water supply is almost empty. Once again, Jack is looked upon for answers, however, Jack seems to be distracted by other things. One of those things being that there seems to be a man in a suit running around in the jungle.
The next bit of drama focuses on Claire, who has just fainted from the heat, and the dwindling water supply doesn't help. People come to her aid, and go to get her some water, but when they reach to water supply, they discover that whatever was left has been stolen!
Now back to Jack. Jack sees that man in the suit, and decides to chase him. While chasing him, he trips and walls and goes sliding down a steep slope. He is about to fall of a cliff, but luckily, he reaches for and grabs a vine. He's just hanging there, but he can't hang on much longer.
At the beach again, everyone is trying to figure out who the water-thief is. Of course, many initially suspect Sawyer... but then they start accusing Sun and Jin. Who could it be? </p>

';
?>

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

Posted: Tue Oct 10, 2006 1:51 am
by Luke
It's because the apostrophe in the word doesn't is terminating the string. You need to escape it with a backslash...
your code wrote:The next bit of drama focuses on Claire, who has just fainted from the heat, and the dwindling water supply doesn\'t help. People come to her aid,
Any syntax-highlighting editor would have prevented this... here's a free one:
http://www.crimsoneditor.com

Posted: Tue Oct 10, 2006 2:10 am
by daweller
The Ninja Space Goat wrote:It's because the apostrophe in the word doesn't is terminating the string. You need to escape it with a backslash...
your code wrote:The next bit of drama focuses on Claire, who has just fainted from the heat, and the dwindling water supply doesn\'t help. People come to her aid,
Any syntax-highlighting editor would have prevented this... here's a free one:
http://www.crimsoneditor.com
OMG that's crazy!
Thank you so much for the help...
I was going banannas trying to get it to work, and here it was all being caused by a little apostrophe :oops:
OK I'm gonna see if it works now
ttyl

Posted: Tue Oct 10, 2006 2:13 am
by Luke
FYI... there's another apostrophe on "he's" and another on "can't"