Parse error: syntax error, unexpected $end line 18

Discussion in 'PHP' started by jwzzr, Feb 21, 2010.

  1. #1
    what went wrong

    <?php 
    
    
    
    "<div class='header'><h2>Da.</h2>
    
    
    
    <li><strong><a href='</strong></li><br><br>
    
    <li><strong><a href=</strong></li><br><br>
    
    <li><strong><a href='</center></strong></li><br><br>
    
    
    <li><strong><a href='></strong></li>
    </p>
    ?>
    PHP:




    line 18 is causing the problem.


    thanks for any help
     
    jwzzr, Feb 21, 2010 IP
  2. Om ji Kesharwani

    Om ji Kesharwani Peon

    Messages:
    211
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Your code is incomplete. Post proper code to solve it.
    Until how can we know line 18
     
    Om ji Kesharwani, Feb 21, 2010 IP
  3. danx10

    danx10 Peon

    Messages:
    1,179
    Likes Received:
    44
    Best Answers:
    2
    Trophy Points:
    0
    #3
    1. Your link tags aint closed.

    2. You havent closed the string with a quote.

    <?php
    
    echo "<div class='header'><h2>Da.</h2>
    
    <li><strong><a href=''></a></strong></li><br><br>
    
    <li><strong><a href=</strong></li><br><br>
    
    <li><strong><a href=''></a></center></strong></li><br><br>
    <li><strong><a href=''></a></strong></li>
    </p>";
    
    ?>
    PHP:
     
    danx10, Feb 21, 2010 IP
  4. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #4
    You need to give us more to work with if you want help.

    Almost nothing is correct in what you provided and the posts above will help. I doubt it will solve your problem completely.

    Unexpected $end usually indicates an unclosed brace } but can be caused by other errors.
     
    Colbyt, Feb 21, 2010 IP
  5. jwzzr

    jwzzr Peon

    Messages:
    108
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    i got it working thanks alot guys i forgot closed the string with a quote.
     
    jwzzr, Feb 21, 2010 IP
  6. Marshton

    Marshton Peon

    Messages:
    109
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Surely both of you noticed the unfinished string:
    
    <?php
    
    
    
    "<div class='header'><h2>Da.</h2>
    
    
    
    <li><strong><a href='</strong></li><br><br>
    
    <li><strong><a href=</strong></li><br><br>
    
    <li><strong><a href='</center></strong></li><br><br>
    
    <li><strong><a href='></strong></li>
    [THISBIT]
    </p>
    ?>[/THISBIT]
    PHP:
    Uhh... No end " or semi-colon.

    Just for future refrence.
     
    Marshton, Feb 21, 2010 IP