这次给大家带来区分关联数组与索引数组的方法,区分关联数组与索引数组的注意事项有哪些,下面就是实战案例,一起来看一下。
数据
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 => <em>¥本文来%源[email protected]搞@^&代*@码)网5</em><strong>搞gaodaima代码</strong>'hello', )
var_dump()
array(3) { [0]=> int(1) [1]=> string(1) "a" [2]=> string(5) "hello" }
相信看了本文案例你已经掌握了方法,更多精彩请关注搞代码其它相关文章!
推荐阅读:
Post无法获取表单数据
php的递归函数该如何使用
天猫和淘宝商品的数据爬取
以上就是区分关联数组与索引数组的方法的详细内容,更多请关注搞代码gaodaima其它相关文章!