Retrieve/get the data from mysql database

By | January 31, 2014

Using select statement we can fetch the data from mysql table.
here we will use 2 function to fetch the data .first is mysql_query() to execute query and mysql_fetch_array() to return the data. this will return data as associative,numeric,or as both.

if you use second parameter/argument in mysql_fetch_array() as MYSQL_ASSOC- it will return array as associative array and using index as name instead of number to fetch the data.