php res mysql_query SELECT FROM razdel while mas mysql_fetch_array res

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
<?php
$res = mysql_query("SELECT * FROM razdel;");
while($mas = mysql_fetch_array($res))
{
$id = $mas["id"];
$rname = $mas["rname"];
echo "<option value='$id'>$rname</option>";
}
?>