Run ❯
Get your
own PHP
server
Result Size:
625 x 565
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <pre> <?php $myArr = []; $myArr[0] = "apples"; $myArr[1] = "bananas"; $myArr["fruit"] = "cherries"; var_dump($myArr); ?> </pre> </body> </html>
array(3) { [0]=> string(6) "apples" [1]=> string(7) "bananas" ["fruit"]=> string(8) "cherries" }