40 of 110 menu

PHP Array Creation

An array in PHP is created using [ ] (prior to PHP version 5.4, an array was created using the array function). See the example:

<?php $arr = ['a', 'b', 'c']; var_dump($arr); ?>

Code execution result:

['a', 'b', 'c']

See Also

English
БеларускаяEspañolРусский
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline