/**
* PHP使用foreach循环反转数组
*
* @param
* @arrange 512-笔记网: 512Pic.com
**/
$users = array("Mani","Nani","Item","Raja");
print "The users are:\n";
foreach ($users as $key => $value) {
print "#$key = $value\n";
}
/*** 来自编程之家 jb51.cc(jb51.cc) ***/
返回结果如下
Output:
The players are:
#0 = Mani
#1 = Nani
#2 = Item
#3 = Raja