First, testing for equality in SQL statements does not use two ==, just one, so your $sql variable should read like:
$sql = "SELECT column1, column2 FROM table WHERE condition='condition2'";
Next, since you're fetching an array from the MySQL result set, the values need to be processed as an array:
$temp = mysql_query($sql);
while($result = mysql_fetch_array($temp)) {
$column_1_value = $result[0];
$column_2_value = $result[1];
}
// Alternatively:
while($result = mysql_fetch_array($temp)) {
$col_1_val = $result["column1"];
$col_2_val = $result["column2"];
}