php使用foreach循环反转数组
$users = array("Mani", "Nani", "Item", "Raja"); print "The users are:\n"; foreach ($users as $key => $value) { print "#$key = $value\n"; }
返回结果如下
Output: The players are: #0 = Mani #1 = Nani #2 = Item #3 = Raja
php使用foreach循环反转数组
$users = array("Mani", "Nani", "Item", "Raja"); print "The users are:\n"; foreach ($users as $key => $value) { print "#$key = $value\n"; }
返回结果如下
Output: The players are: #0 = Mani #1 = Nani #2 = Item #3 = Raja