Difference between mysql_fetch_array and mysql_fetch_row?

前端 未结 10 1354
野的像风
野的像风 2020-12-02 08:36

This is a simple question for PHP users. The reason I couldn\'t get the the exact difference between mysql_fetch_array() and mysql_fetch_row() in P

10条回答
  •  一生所求
    2020-12-02 09:21

    mysql_fetch_array as the manual says can return an int (position) based index, associative array or both according to the result_type chosen.

    in the other hand mysql_fetch_row always return the result set based on integer index.

    I personally recommend you to use mysql_fetch_array passing MYSQL_ASSOC as second parameter since is always easier to know what field you would like to fetch

提交回复
热议问题