1 foreach($array as $key => $val){ 2 //statements... 3 }
如果$key是字符串数字 则自动被转换为int类型
对于session的设置必须在session_start()执行之前,否则不会生效。