The array Function in PHP
The array function creates an array in PHP:
<?php
$arr = array('text1', 'text2', 'text3');
?>
Currently, a more modern approach
is to create an array using square
brackets [ ], like this:
<?php
$arr = ['text1', 'text2', 'text3'];
?>
See Also
-
lesson
arrays in PHP