From php.net

Originally Posted by
Description
array mysql_fetch_array ( resource $result [, int $result_type = MYSQL_BOTH ] )

Originally Posted by
Parameters
result
The result resource that is being evaluated. This result comes from a call to mysql_query().
result_type
The type of array that is to be fetched. It's a constant and can take the following values: MYSQL_ASSOC, MYSQL_NUM, and MYSQL_BOTH.
PHP Code:
$retval=mysql_query($sql, $conn) or die(mysql_error());
while ($r=mysql_fetch_array($retval,MYSQL_BOTH))
{
echo $r['option1']."<br/>";
}
Bookmarks