== && = are operators $nim == $row[0] means that variable $nim must exactly the same as $row[0] $nim = $row[0] means you assign the value of $row[0] to $nim