14. PHP Array Functions-1 | array(), array_change_key_case, array_chunk | ATIBlog

Publié le: 19 novembre 2017
sur la chaîne: ATIBlog
1,171
22

ATIBlog php array functions tutorial for beginners in Hindi.

Array functions -1

Array()
Array_change_key_case()
Array_chunk()

1.Array() - Creates an array
$x=array(‘hello’, 1, 240, true);

2. Array_change_key_case()
It changes all the array keys to lowercase/uppercase , then returns the resulting array.
Parameter1 : An Array.
Parameter2 : (Integer, we give php pre-defined constant). Either CASE_UPPER or CASE_LOWER (default).
CASE_UPPER =1, CASE_LOWER=0
Array_change_key_case($arr, CASE_UPPER);

3. Array_chunk()
This function is used to partition the array into chunks of equal sizes. The last chunk may contain lesser elements than the previous chunks.
Parameter1: An Array
Parameter2: Integer (size of each chunk)
Parameter3: Boolean (optional) preserve_key (default:false). If false: the keys will not be preserved(numeric index). True: preserved.


Sur cette page du site, vous pouvez voir la vidéo en ligne 14. PHP Array Functions-1 | array(), array_change_key_case, array_chunk | ATIBlog durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur ATIBlog 19 novembre 2017, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 1,171 fois et il a aimé 22 téléspectateurs. Bon visionnage!