Hi everyone! I'm the author of code.mu :)
I'd love to chat with my non-Russian audience. I'm looking for your feedback on the site and the translation quality. Let's chat:)
15 of 110 menu

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

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