PHP Code:
    $result mysql_query("SELECT * FROM gallery WHERE id=$id");
            while(
$row=mysql_fetch_array($result)){
                
$numvotes $row['numvotes'] + 1;
                
$newrating $row['rating'] + (int)rating;//thisline
                
$newrating /= $numvotes;
                echo 
"$numvotes  $newrating  $rating  $row[rating] <br>";
            } 
"thisline" refuses to add, i can't figure out why

rating is passed through GET. $row[numvotes] + 1 adds fine
i tried casting it, thinking that would solve it, doesnt work either