parse error, unexpected T_VARIABLE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shanehenery
    New Member
    • Feb 2010
    • 24

    parse error, unexpected T_VARIABLE

    Hi



    I have a "parse error, unexpected T_VARIABLE" in the following php code

    it is in line 43 that will be the line starting with $sno=$row['0'];



    I have tryed different things like including { } in the beginning and the end of the string

    that is not working at all

    can you pleas help me out



    Code:
    <?php
    
    if(mysql_affected_row()==1)
    mysql_select_db("dbregistration")or die("Unable to select database");
    $result=mysql_query("SELECT*from student WHERE sno='$sno'");          
    
    while($row=mysql_query(fetch_row($result))       
    
     
    
    $sno=$row['0'];
    echo"your student number is:$sno";
    
    ?>
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    You're missing the closing parenthesis on line 7.

    Comment

    Working...