Run ❯
Get your
own PHP
server
Result Size:
625 x 565
×
Change Orientation
Change Theme, Dark/Light
Go to 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