[ciapug] strange php/mysql result

Eric Junker eric at eric.nu
Tue Jan 22 11:54:32 CST 2008


Dave J. Hala Jr. wrote:
> I don't understand where the elements [0],[1],[2] came from. Is there
> a way to get mysql_fetch_array to return the array without the 0,1,2 
> elements?

Use mysql_fetch_assoc() or mysql_fetch_array(,MYSQL_ASSOC)

http://us.php.net/manual/en/function.mysql-fetch-assoc.php

Eric



More information about the ciapug mailing list