I'm using the following code to grab and store a value from a table in a mysql database.
$result = mysql_query(" SELECT email FROM users WHERE username = '$username' ");
$row = mysql_fetch_array($result);
$email = $row["email"];
It works fine but my question is why do I have to fetch it from an array? Shouldn't it be a single non-array value? Shouldn't the value of $result be the email address?