creating an array php code example
Example 1: array in php
<?php
$cars = array("Maserati", "Porsche", "BMW");
echo "I like " . $cars[0] . ", " . $cars[1] . " and " . $cars[2] . ".";
?>
Example 2: php array
$array = ['cheese', 'ham', 'potato'];
var_dump($array);