SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    United Kingdom
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Code / Parse Problem

    Okay, here's my problem:

    Earlir on in the code, I've opened up a mysql connection, set all the variables seen below etc. I close the php tag, then re-open it later when I need more info displayed from the table. I use the following code:

    <?php

    // Display the main text
    while ( $row = mysql_fetch_array($result) ) {
    echo("<P>" . "Publisher:" . $row["Publisher"] . "<br>" .
    "Developer: $row["Developer"] "</P>");
    }

    ?>

    Yet I get this error:
    Parse error: parse error, expecting `STRING' or `NUM_STRING' or `'$'' in /home/ngamin/public_html/ts/previews.php on line 184

    line 184 is echo("<P>" . "Publisher:" . $row["Publisher"] . "<br>"
    No one is a virgin, life screws us all

  2. #2
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think your problem is here:

    "Developer: $row["Developer"] "</P>");

    Change that to:

    "Developer: ".$row["Developer"]."</P>");

    And it should work.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2001
    Location
    United Kingdom
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Almost...

    That's almost gotten rid of the problem. Where I was getting the error, it's now gone, but the text that should appear there hasn't.

    http://www.n-gaming.com/ts/previews.php?game=Zelda&id=1

    The text should be inside the game info table. That's just a sample preview layout, while I try to get it working.
    No one is a virgin, life screws us all


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
  •