运行 ❯
获取您的
自己的 PHP
服务器
×
更改方向
更改主题,深色/浅色
转到 Spaces
<!DOCTYPE html> <html> <body> <?php $people = [ "Peter" => "35", "Ben" => "37", "Joe" => "43" ]; foreach($people as $person => $age) { echo "$person is $age years old"; echo "<br>"; } ?> </body> </html>
Peter 35 岁
Ben 37 岁
Joe 43 岁