PHP mysql_fetch_array What’s the Difference between MYSQL_NUM and MYSQL_ASSOC

October 20th, 2011 by Regaz

PHP 5 mysql_fetch_array Funct MYSQL_NUM/MYSQL_ASSOC




The Tip Show the Difference between MYSQL_NUM and MYSQL_ASSOC PHP mysql_fetch_array Function Option.

Here we suppose to have a SQL Query stored in the Variable $query.

 - Featured
  • mysql_fetch_array($query,MYSQL_NUM): Process the Results of the Query and for Each Row Returned Discard the Column Name and Store the Row Content Popping it into a Common Array
  • mysql_fetch_array($query,MYSQL_ASSOC): Process the Results of the Query and for Each Row Returned Store the Column Name as the Key and the Content as the Value Popping them into an Associative Array
(Visited 1 times, 1 visits today)

Tags: ,


Comments are disabled