php 读取多维数组方法_PHP教程
php 读取多维数组方法
for($i=0;$i
for($j=0;$j
echo $array[$j][userid];
}
}
因为它是个多维数组,一般用
foreach ($arr as $key => $value) {
echo "Key: $key; Value: $value
\n";
}
Array ( [0] => Array ( [userid] => 1 [username] => 刘振鹏 [status] => 0 [userpwd] => ) [1] => Array ( [userid] => 2 [username] => 刘鹏飞 [status] => 0 [userpwd] => ) [2] => Array ( [userid] => 3 [username] => 刘朋 [status] => 0 [userpwd] => ) [3] => Array ( [userid] => 4 [username] => admin [status] => 0 [userpwd] => ) [4] => Array ( [userid] => 11 [username] => admin [status] => 0 [userpwd] => ) [5] => Array ( [userid] => 12 [username] => admin [status] => 0 [userpwd] => ) [6] => Array ( [userid] => 13 [username] => liuzp [status] => 0 [userpwd] => ) [7] => Array ( [userid] => 14 [username] => lzp [status] => 0 [userpwd] => ) )
上一篇: PHP 删除文件夹及其文件夹下所有文件,_PHP教程
下一篇: php class的申明与使用方法
推荐阅读
-
php为什么选mysql作为数据库? Mysql 创建用户方法_PHP教程
-
php使用explode()函数将字符串拆分成数组的方法_PHP
-
PHP关联数组实现根据元素值删除元素的方法_PHP
-
Codeigniter中集成smarty和adodb的方法,codeignitersmarty_PHP教程
-
PHP获取photoshop写入图片文字信息的方法_PHP教程
-
PHP函数ini_get_all获取设置选项变量的方法介绍_PHP教程
-
php数组对数组元素去重_PHP教程
-
php将字符串随机分割成不同长度数组的方法
-
php随机获取金山词霸每日一句的方法,金山词霸每日一句_PHP教程
-
PHP新手NOTICE错误常见解决方法_PHP教程