Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用作为数组键提取的列之一创建一个数组,但我收到了错误消息unexpected T_DOUBLE_ARROW
unexpected T_DOUBLE_ARROW
$students = array(); foreach ($rows as $row) { $students[$row['first_name']] => $row['last_name']; }
=>应该替换为=
=>
=
$students[$row['first_name']] = $row['last_name'];
$students = array(); foreach ($rows as $row) { $students=array($row['first_name'] => $row['last_name']); }