Daily Archives: 06/05/2012

what is difference between mysql_fetch_array(), mysql_fetch_row(), mysql_fetch_assoc() and mysql_fetch_object() in php

May 6, 2012   php   Author: 
what is difference between mysql_fetch_array(), mysql_fetch_row(), mysql_fetch_assoc() and mysql_fetch_object() in php
Many of the php programming newbies get confused about mysql_fetch_array(), mysql_fetch_row(), mysql_fetch_assoc() and mysql_fetch_object() functions, but all of these functions performs a similar process. Let us create a table "tb" for clear example with three fields "id", "username" and "password" READ ALSO: 5 PHP Functions to Fetch Data from Database Table:  tb Insert a new row into the table with values 1 for id, tobby for username and tobby78$2 for password   db.php [code type=php] <?php $query=mysql_connect("localhost","root",""); mysql_select_db(