Hi friends,
I want know that In mysql_fetch_array() If two or more columns of the result have the same field names, what action is taken?
Thanks
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Satyapriya NayakPosted Dec 27, 2011, 10:45 PM
The mysql_fetch_array() function returns a row from a recordset as an associative array and/or a numeric array.
If two or more columns of the result have the same field names, the last column will take precedence. To access the other column(s) of the same name, you must use the numeric index of the column or make an alias for the column. For aliased columns, you cannot access the contents with the original column name.
Refer
http://php.net/manual/en/function.mysql-fetch-array.php
http://www.w3schools.com/php/func_mysql_fetch_array.asp
Thanks