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