Behaviour of assigning mysql_fetch_array to another array

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
DigitalRice
New php-forum User
New php-forum User
Posts: 29
Joined: Fri Jun 27, 2003 10:05 pm

Post by DigitalRice » Thu Sep 25, 2003 8:00 am

when using mysql_fetch_array(your_result_query)

the return result will be number index and also associate fields. to get rid of the index field when the query return, try one of this.

Code: Select all

mysql_fetch_array(your_result_query, MYSQL_ASSOC)
or
mysql_fetch_assoc(your_result_query)


this only return the associate field as you wanted.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests