phpeveryday.com

The best tutorial of php, php framework, php strategies, object oriented oriented,


PHP MySQL: mysql_fetch_array() Function

Tag: mysql, database, mysql_fetch_array   Category: PHP Database
post: 02 Mar 2008 read: 1,710


php mysql basic step by step tutorial - part 12: Beside using mysql_fetch_row() function in order to get the query result into database, you can also use mysql_fetch_array() function. It has the same function as mysql_fetch_row() function where the data reads line per line.

The difference of both function is that the result of mysql_fetch_array() function is in the array assosiatif shape. For example, if you use mysql_fetch_array() in the program of data_employees such as $row = mysql_fetch_array($result) will produce:


The first read: $row[employees_number] = "2"
		$row[name] = "Brain McFaiden"
		$row[address] = "Obama Street B12"

The second read: $row[employees_number] = "4"
		$row[name] = "Clara Chloe"
		$row[address] = "Big Paradise California CC10"

and so on until the reading process is done line per line and until there is no more line to read.



Series this article:
PHP MySQL: Connecting to Database Use mysql_connect()
PHP MySQL: Making Database Use mysql_create_db()
PHP MySQL: Making Table
PHP MySQL: The Data Type of Field
PHP MySQL: Char and Varchar Data Type
PHP MySQL: Data Type of Date
PHP MySQL: MySQL Syntax Orders
PHP MySQL: Inserting Data
PHP MySQL: Creating Form Insert Data
PHP MySQL: Display Data
PHP MySQL: mysql_fetch_row() Function
PHP MySQL: mysql_fetch_array() Function
PHP MySQL: Editing data
PHP MySQL: Deleting data
PHP MySQL: Adding Field Table
PHP MySQL: Editing Field Table
PHP MySQL: Deleting Field Table

| Give Your Opinion | Recommend
Share and Bookmark to: These icons link to social bookmarking sites where readers can share and discover new web pages.
digg del.icio.us technorati Ma.gnolia BlinkList

Recommended articles by other readers:
Web Services: How PHP Kiss VB.NET? (Part 1)
Chart: How to Build Cool Animation Real Time Chart
Joomla: Fast Road to Understand Component Programming
Email: Send Attachement Mail
mod_rewrite - Part 1: create your "fantasy" URL

What do You Think?
Your Name *:
Email *:
(Will not be published)
Website/URL:
Your Comment *:
* Required


615
posting