PHP Mysql_fetch_array What’s the Difference Between MYSQL_NUM and MYSQL_ASSOC

October 20, 2011 | By Duchateaux.

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.

How to Install MySQL Workbench on Ubuntu 24.04 – Step-by-step
  • 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


QuickChic Theme • Powered by WordPress