// Creating a numeric array $fruits = array("Apple", "Banana", "Orange"); // Accessing elements by index echo $fruits[0]; // Outputs "Apple" echo $fruits[1]; // Outputs "Banana" echo $fruits[2]; // Outputs "Orange"
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter