运行 ❯
获取您的
自己的 PHP
服务器
×
更改方向
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <?php $cars = array("Volvo", "BMW", "Toyota"); sort($cars); foreach ($cars as $key => $val) { echo "cars[" . $key . "] = " . $val . "<br>"; } ?> </body> </html>
cars[0] = BMW
cars[1] = Toyota
cars[2] = Volvo