mysql_fetch_array(),mysql_fetch_assoc() and mysql_fetch_row()
In PHP MySQL mannual. There are three functions which need to be clarified for some users who may get confused when choosing which one to use to get the result.
mysql_fetch_array() : by seeting the different parameters, there are three ways to return the result set. MYSQL_ASSOC(Result set with field names as the associative indexs.It means you can use the field name as the index to get value of the specified cell). MYSQL_NUM(Result set with field names as the number indices). Or MYSQL_BOTH(you can use both modes to get value of a specified cell).
mysql_fetch_assoc():Result set with field names as the associative indexs.It means you can use the field name as the index to get value of the specified cell. It similars to mysql_fetch_array() with MYSQL_ASSOC speficied.
mysql_fetch_row():Result set with field names as the number indices.It similars to mysql_fetch_array() with MYSQL_NUM speficied.
Among these 3 functions, usually mysql_fetch_row() is the fastest one.
Note : mysql_fetch_object() has similar functions to the three functions mentioned above with the return value object instead of array.
While the whole world raves about the recent Apple products and of course the advancements in the digital world, IKEA Singapore shows how traditional pen and paper still hold on to an old world charm. On its Facebook page, IKEA Singapore put up this post: Obviously this is a post laughes at the Appl