PHP "if" Error

Discussion in 'Software' started by NotUserFriendly, Nov 6, 2008.

  1. NotUserFriendly

    NotUserFriendly Private E-2

    please help... im writing in PHP and im having trouble with a very simple line of code.

    Parse error: syntax error, unexpected T_IF on line 3

    PHP:
    <?php
    $s
    =$rows['stars']
    if (
    $s==1)
        echo 
    "<image src='images/rate1.gif' height='27' width='58' align='right'>"
    elseif ($s==2)
        echo 
    "<image src='images/rate2.gif' height='27' width='58' align='right'>"
    else
        echo 
    "<image src='images/rate0.gif' height='27' width='58' align='right'>"
    ?>
    i dont see anything wrong, maybe you can... please help!
     
  2. NotUserFriendly

    NotUserFriendly Private E-2

    Never mind someone found my errorS
    I left the semi-colons off. :rolleyes:
    *kicking myself*
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds