Source Code:
(back to article)
<?php // Using the array() function $array1 = array("apple", "banana", "cherry"); // Using square brackets $array2 = ["dog", "cat", "bird"]; print_r($array1) . PHP_EOL; print_r($array2);
Result:
Report an issue