This Message Forum is no longer in use

Please use the new Bravenet Help Forums FOUND HERE

General Forum
This Forum is Locked
Author
Comment
Why does PHP see the data as an array?

I have written the following PHP/MySQL code, which does work:

$sql = "SELECT country_id FROM countries WHERE country = '$country_chosen';";
$result1 = mysql_query($sql);
$result = mysql_fetch_row($result1);
$result = $result[zero];

(I had to use the word 'zero' in this post. If I use the number 0, as it appears in the code, I get an emoticon.)

I do not understand why the result I get is an array, hence the need to use the last two lines. The result should logically be the entry in a single field. If I run the MySql command directly in MySql, it works.

Is there a way I can get PHP to see the value as a single item rather than an array and that I can cut one or two lines from the code?