Log in

View Full Version : parse error -- where?!



kimbrena
01-02-2007, 12:43 AM
I am learning PHP/MySQL through the book "PHP and MySQL for dynamic web sites" - 2nd Edition - by Larry Ullman.

this is one of the scripts it gives for me to use and shows an example of what should show up. However, all I'm getting is parse codes for line #11. why is this? :confused:

<!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" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type"content="text/html; charset=iso-8859-1 />
<title> White Space </title>
</head>

<body>
<?php>

echo 'This echo() statement runs
over the course of two lines!';

echo "<br />This line should appear separately in the Web page.\n\n";

echo 'Now I\'m done.';
?>

</body>
</html>

thetestingsite
01-02-2007, 01:49 AM
The only thing I could see in the above code was the extra ">" in the opening PHP block as shown below.





<?php>



It should be as follows:



<?php


or, if short open tags are allowed:



<?


Hope this solves the problem.

kimbrena
01-02-2007, 02:10 AM
YES!!

thank you very much!! :D