Heim > Fragen und Antworten > Hauptteil
保哥后院2019-01-02 16:48:11
foreach是遍历数组的语句,标准用法是:foreach(数据类型 标识符 in 表达式)
e.g:
$person = array(
"name1" => "peter",
"name2" => "lisi"
);
foreach ($person as $person_value) {
echo "姓名:" . $person_value;
echo "<br>";
}