php关联数组与索引数组及其显示

数据

username password
test 123456

关联数组:

   mysql_fetch_assoc()
   array([username]=>'test',[password]=>'123456')

索引数组:

mysql_fetch_array()
array([0]=>'test',[1]=>'123456')

var_export()

array ( 0 => 1, 1 => 'a', 2 => 'hello', )

var_dump()

array(3) { [0]=> int(1) [1]=> string(1) "a" [2]=> string(5) "hello" }
posted @ 2017-02-23 18:44  岳麓丹枫  阅读(270)  评论(0编辑  收藏  举报