PHP Array
An array in PHP is created using square
brackets [ ]. See the example:
<?php
$arr = ['php', 'html', 'css'];
var_dump($arr);
?>
Code execution result:
['php', 'html', 'css']
Previously, the array function was used
to create an array, but currently
it is not particularly popular, although
it works and can be found in old code.
See Also
-
lesson
arrays in PHP