27 of 110 menu

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

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