Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Please help a newbie - PHP basic question!
Old 11-12-2008, 08:43 AM Please help a newbie - PHP basic question!
magicvw's Avatar
Extreme Talker

Latest Blog Post:
Ye Olde Christmas Music
Posts: 235
Name: Vicky
Location: Brit in Bulgaria
Trades: 1
I am using the "PHP & MYSQL for Dummies" book to learn PHP. Just starting out and I have come unstuck already.

I have copied/pasted the following code from the book

<html>
<head><title>Hello World Program</title></head>
<body>
<?php
echo “<p>Hello World!”
?>
</body>
</html>

as the book says, but when I view the page I get

Parse error: syntax error, unexpected '>' in /home/mymusic/public_html/php-practice/helloworld.php on line 5



Am I missing something really obvious here? I am really fed up as I can't even do the 1st, simplest step in this language!!
__________________

Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
magicvw is offline
Reply With Quote
View Public Profile Visit magicvw's homepage!
 
 
Register now for full access!
Old 11-12-2008, 08:50 AM Re: Please help a newbie - PHP basic question!
Extreme Talker

Posts: 246
Trades: 3
Missing a semi-colon at the end of the line starting with echo
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
CouponGuy is offline
Reply With Quote
View Public Profile
 
Old 11-12-2008, 08:55 AM Re: Please help a newbie - PHP basic question!
magicvw's Avatar
Extreme Talker

Latest Blog Post:
Ye Olde Christmas Music
Posts: 235
Name: Vicky
Location: Brit in Bulgaria
Trades: 1
OK I put the semicolon in:

<html>
<head><title>Hello World Program</title></head>
<body>
<?php
echo “<p>Hello World!”;
?>
</body>
</html>

I'm still getting the same error message. Any other ideas?
__________________

Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
magicvw is offline
Reply With Quote
View Public Profile Visit magicvw's homepage!
 
Old 11-12-2008, 09:05 AM Re: Please help a newbie - PHP basic question!
magicvw's Avatar
Extreme Talker

Latest Blog Post:
Ye Olde Christmas Music
Posts: 235
Name: Vicky
Location: Brit in Bulgaria
Trades: 1
OK I sorted it!

I got the wrong sort of quotes due to copying and pasting from the pdf of the book. That'll teach me to be lazy and not type out the code myself!

Thanks for the tip about the semi-colon though - it is not included in the book. (Glad I got it as a free download and didn't part with my hard-earned cash!)
__________________

Please login or register to view this content. Registration is FREE



Please login or register to view this content. Registration is FREE
magicvw is offline
Reply With Quote
View Public Profile Visit magicvw's homepage!
 
Old 11-12-2008, 09:14 AM Re: Please help a newbie - PHP basic question!
Extreme Talker

Posts: 246
Trades: 3
Good work! Don't give up. It only gets easier from here.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
CouponGuy is offline
Reply With Quote
View Public Profile
 
Old 11-12-2008, 07:52 PM Re: Please help a newbie - PHP basic question!
Defies a Status

Posts: 1,606
Trades: 0
Quote:
OK I sorted it!

I got the wrong sort of quotes due to copying and pasting from the pdf of the book. That'll teach me to be lazy and not type out the code myself!
The wrong quotation marks, commas, and semi-colons will keep you entertained for many hours. At least they did it for me.

__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Please help a newbie - PHP basic question!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23036 seconds with 12 queries