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