Jump to content
Larry Ullman's Book Forums

Recommended Posts

Yup, already ran into trouble.

 

Page Chapter 2, Page 46,47

 

Here's my script:

 

 

<?php // Script 2.4 - quotes.php

 

//single or double quotation marks won't matter here:

$first_name = 'Saige';

$last_name = "The Powerful";

 

//single or double quotation marks DOES matter here:

$name1 '$first_name $last_name'; <----- Line 16

$name2 "$first_name $last_name";

 

//single or double quotation marks DOES matter here:

 

print "<h1>Double Quotes</h1> <p>name1 is $name1 <br />

name2 is $name2</p>";

 

print '<h1>Single Quotes</h1> <p>name1 is $name1 <br />

name2 is $name2 </p>'

?>

 

 

Here's my error message:

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /quotes.php on line 16

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...