mardi 11 septembre 2018

PHP - Square Brackets Before Functions

i use array_rand function to get random arrays value. after searching i found this code :

$random = $arList[array_rand($arList)];

my questions : why use Square brackets before array_rand function ? and when should we use it in our code ?

[array_rand($arList)]




Aucun commentaire:

Enregistrer un commentaire