Open Source Tutorials - Open Source Training
Open source training & tutorials from experienced, passionate people
chrome icon firefox icon ie icon opera icon safari icon Sings in these Browsers
A- A A+

By A Web Design

Welcome, Guest
Username Password: Remember me

difference between mysql_fetch_array..............
(1 viewing) (1) Guest
All your queries regarding
PHP Installation,
Binding Apache-PHP-MySQL,
and tonnes more... will be solved in this forum
  • Page:
  • 1
TOPIC:

difference between mysql_fetch_array..............

difference between mysql_fetch_array.............​. 1 year, 9 months ago #116

  • avan12
  • OFFLINE
  • Junior Boarder
  • Posts: 35
  • Karma: 0
Hi,

I am working on a project and I want to know the differences between mysql_fetch_array(), mysql_fetch_object(), mysql_fetch_row()?

Re:difference between mysql_fetch_array.............​. 1 year, 9 months ago #121

  • sabastian
  • OFFLINE
  • Fresh Boarder
  • Posts: 5
  • Karma: 0
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().

Re:difference between mysql_fetch_array.............​. 1 year, 9 months ago #123

  • manav
  • OFFLINE
  • Senior Boarder
  • Posts: 51
  • Karma: 0
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 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.).
  • Page:
  • 1
Time to create page: 1.38 seconds
OSV Newsletter


Receive HTML?

NOTE: To prevent subscription to the OSV newsletter, uncheck the checkbox above.
Guest Blog for OSV
Free Ebook Download