extract()
$result1 = mysql_query("SELECT * FROM `home` WHERE id='1'");
$row1 = mysql_fetch_assoc($result1);
extract($row1);
// do what you want with row 1
$result2 = mysql_query("SELECT * FROM `home `WHERE id='2'");
$row2 = mysql_fetch_assoc($result2);
extract($row2);
// do what you want with row 2
Unless you are trying to compare stuff from the first and second... Then you can change the second extract to be extract($row2, EXTR_PREFIX_SAME, 'b')
so you vars for the second row would be $b_(column name)