PHP Questions Home | Register | Login
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website
Unanswered

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

What is difference between mysql_fetch_array and mysql_fetch_object?


These are two different ways of returning elements from a database using a mySQL query. You can also use the method mysql_fetch_row for a third possible method.

Essentially the difference is how the return value is treated.

The array returns an array of values, whilst the object method returns an object, as the names suggest. So the way that you get the data you require out varies depending on which method you use.

Most common is probably mysql_fetch_array.

Comment on this Question and Answer >>>

ASK A QUESTION

More mysql PHP Questions

How do I find the number of rows in a result set?

I am extracting data from a MySQL Database of which one of the data stored is seperated by a comma. For example, step1,go here,step 2,go there,step 3,go back etc etc. I want to know how to split the data at the comma and format it in html. Using the split

How do I update the contents of a table row?

How do I connect to mySQL from PHP?

How do I find the ID of a new row added to a table?



Custom Search