Jump to content

[SOLVED] Error


skymanj

Recommended Posts

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional/dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="content-type" content="text/html; charset="iso8859-1" />

<title>Quotes</title>

</head>

<body>

<?php //Script 2.4-quotes.php//

//single or double quotes dont matter here

$first_name="Larry";

$last_name="Ullman";

//Single or Double quotes do matter here

$name1='$first_name $last_name';

$name2="$first_name $last_name";

//Single or double quotes do matter here

print "<p>name1 is $name1<br />

name2 is $name2</p>;

print '<p>name1 is $name1<br />

name2 is $name2</p>';

?>

</body>

</html>

Link to comment
https://forums.phpfreaks.com/topic/56447-solved-error/#findComment-278796
Share on other sites

you'd missed out a " after one of the prints.

try this:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional/dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset="iso8859-1" />
<title>Quotes</title>
</head>
<body>
<?php //Script 2.4-quotes.php//
//single or double quotes dont matter here
$first_name="Larry";
$last_name="Ullman";
//Single or Double quotes do matter here
$name1='$first_name $last_name';
$name2="$first_name $last_name";
//Single or double quotes do matter here
print "<p>name1 is $name1

name2 is $name2</p>";
print '<p>name1 is $name1

name2 is $name2</p>';
?>
</body>
</html>

 

EDIT: beaten to it :P

Link to comment
https://forums.phpfreaks.com/topic/56447-solved-error/#findComment-278802
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.