跳转到主内容
websoft网络软件专家 - 深耕网络技术,打造实用软件!

区分关联数组与索引数组的方法

这次给大家带来区分关联数组与索引数组的方法,区分关联数组与索引数组的 注意事项 有哪些,下面就是实战案例,一起来看一下。 数据
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" }
相信看了本文案例你已经掌握了方法,更多精彩请关注php中文网其它相关文章! 推荐阅读: Post无法获取表单数据 php的递归函数该如何使用 天猫和淘宝商品的数据爬取

相关文章