up vote 0 down vote favorite
share [g+] share [fb]
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN”
“http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<head>
<title>Hello</title>
<link rel=”stylesheet” type=”text/css” href=”common.css” />
</head>
<body>
<h1><?php echo “Hello, world!”; ?></h1>
</body>
</html>

Parse error: syntax error, unexpected '!', expecting ',' or ';' in C:\xampp\htdocs\test.php on line 9

I need helping fixing this error that I am receiving.

link|improve this question

10  
Please don't tell me you're using MS Word to write your code... – BoltClock Dec 6 '10 at 18:46
feedback

1 Answer

up vote 3 down vote accepted

It looks like you've got fancy quotes in your echo instead of regular quotes, like so: ". These are usually from word processors like Word. Try replacing them in an editor like notepad or textedit.

Those kind of quotes aren't really valid for your HTML, either, but most browsers will probably let it slide. I'd replace all of them with plain old standard quotes.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.