Results 1 to 3 of 3

Thread: parse error -- where?!

  1. #1
    Join Date
    Jan 2007
    Location
    With my dear husband in the southern states ;)
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question parse error -- where?!

    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?

    <!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>

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    The only thing I could see in the above code was the extra ">" in the opening PHP block as shown below.

    Quote Originally Posted by kimbrena
    Code:
          <?php>
    It should be as follows:

    Code:
    <?php
    or, if short open tags are allowed:

    Code:
    <?
    Hope this solves the problem.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Jan 2007
    Location
    With my dear husband in the southern states ;)
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    YES!!

    thank you very much!!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •