mysql_fetch_array and only string array keys

前端 未结 3 1095
故里飘歌
故里飘歌 2021-01-28 16:01

When I try to print_r mysql_fetch_array of a sql query, I get this result.

Array
(
    [0] => 1
    [id] => 1
    [1] => 2011
    [publish_date] => 2         


        
相关标签:
3条回答
  • 2021-01-28 16:15

    instead of mysql_fetch_array use mysql_fetch_assoc. thats it.

    0 讨论(0)
  • 2021-01-28 16:30

    Use mysql_fetch_assoc

    0 讨论(0)
  • 2021-01-28 16:30

    Use mysql_fetch_assoc function

    or

    Use second parameter for mysql_fetch_array function: MYSQL_ASSOC

    0 讨论(0)
提交回复
热议问题