What Are The Differences Between Mysql_fetch_array(), Mysql_fetch_object(), Mysql_fetch_row()

What Are The Differences Between Mysql_fetch_array(), Mysql_fetch_object(), Mysql_fetch_row()


  • 14 Mar, 2012

    Answer 1:mysql_fetch_array() -> Fetch a result row as a combination of associative array and regular array.mysql_fetch_object() -> Fetch a result row as an object.mysql_fetch_row() -> Fetch a result set as a regular array().Answer 2:The difference between mysql_fetch_row() and mysql_fetch_array() is that the first returns the results in a numeric array ($row[0], $row[1], etc.), while the latter returns a the results an array containing both numeric and associative keys ($row['name'], $row['email'], etc.). mysql_fetch_object() returns an object ($row->name, $row->email, etc.).

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.