Jump to content
Larry Ullman's Book Forums

Recommended Posts

After studying the section on quotation marks I wrote this script:

<?php // scalar.php
$first_name = "Paul";
$last_name = "Smith";
$age = 57;
$birth_date = "july 15,1957";
print "<p>First Name:$first_name<br />Last Name:$last_name<br />Age is:$age<br />Date of Birth:$birth_date</p>";
?>

then I wrote this one:

<?php // scalar.php
$first_name = 'Paul';
$last_name = 'Smith';
$age = 57;
$birth_date = "july 15,1957";
print "<p>First Name:$first_name<br />Last Name:$last_name<br />Age is:$age<br />Date of Birth:$birth_date</p>";
?>

However I see no difference when using single or double quotes.  Based on my interpretation of single and double quotes not being printed the same in the book, what am I not understanding?

Link to comment
Share on other sites

 Share

×
×
  • Create New...