Results 1 to 5 of 5

Thread: Weird PHP Error

  1. #1
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055

    Weird PHP Error

    Parse error: syntax error, unexpected T_LNUMBER in /home/virilneu/public_html/recipes/search.php on line 58

    Line 58 isn't even PHP.

    PHP Code:
    ?>

    <br /><h3>Search Results</h3><table border = "0" class="rows" style = "border: 1px solid #261C13;"><tr class = "even">

    <?
    I turn it into php:

    PHP Code:
    echo '<br /><h3>Search Results</h3><table border = "0" class="rows" style = "border: 1px solid #261C13;"><tr class = "even">'
    and get the same error, I remove the line entirely....

    and get this next error

    Parse error: syntax error, unexpected '=' in /home/virilneu/public_html/recipes/search.php on line 64
    Like 64 also isn't really php...

    PHP Code:
    while($main = mysql_fetch_array($view)) { 
                ?><td><a href = "/recipes/recipeview.php?rid=<?=$main['id'];?>"><?=$main['recipename'];?></a></li>
    <?
    The line with the link is 64.

    I copied this code verbatim from another script of mine. Works fine there... wth?
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  2. #2
    Administrator Chris's Avatar
    Join Date
    Feb 2003
    Location
    East Lansing, MI USA
    Posts
    7,055
    ....nevermind.... as soon as I posted I found the error, 20 lines up I was missing a "
    Chris Beasley - My Guide to Building a Successful Website[size=1]
    Content Sites: ABCDFGHIJKLMNOP|Forums: ABCD EF|Ecommerce: Swords Knives

  3. #3
    4x4
    Join Date
    Oct 2004
    Posts
    1,043
    Quote Originally Posted by Chris View Post
    ....nevermind.... as soon as I posted I found the error, 20 lines up I was missing a "
    Hardest type of bloody errors to find

  4. #4
    Registered
    Join Date
    Mar 2006
    Posts
    156
    Yeah, and to make it more complicated...PHP doesn't always give you the exact line number were the error is. So if it gives you an error in a line that has no PHP (or no error), just look a few lines above, like Chris did.

  5. #5
    Site Contributor KLB's Avatar
    Join Date
    Feb 2006
    Location
    Saco Maine
    Posts
    1,181
    Quote Originally Posted by Chris View Post
    ....nevermind.... as soon as I posted I found the error, 20 lines up I was missing a "
    That was going to be my suggestion. Look for a mistake higher up.
    Ken Barbalace - EnvironmentalChemistry.com (Environmental Careers, Blog)
    InternetSAR.org: Volunteers Assisting Search and Rescue via the Internet
    My Firefox Theme Classic Compact: Based onFirefox's classic theme but uses much less window space

Similar Threads

  1. Review: Professional PHP Programming
    By Chris in forum Books
    Replies: 6
    Last Post: 07-17-2013, 05:26 AM
  2. WHM Error Pages Manager 2.01 (WHM Plugin)
    By WEBDOMAIN.com in forum The Marketplace
    Replies: 0
    Last Post: 07-16-2007, 05:40 AM
  3. Using PHP to produce PHP really screws with the head.
    By KLB in forum Website Programming & Databases
    Replies: 8
    Last Post: 02-14-2007, 11:36 AM
  4. little help with mod-rewrite and php on linux
    By dkoepke in forum Website Programming & Databases
    Replies: 1
    Last Post: 02-09-2005, 06:37 PM
  5. Simple PHP Error
    By ozgression in forum Website Programming & Databases
    Replies: 5
    Last Post: 01-16-2005, 03:27 PM

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
  •