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

Published: 19 November 2017
on channel: 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.


On this page of the site you can watch the video online 14. PHP Array Functions-1 | array(), array_change_key_case, array_chunk | ATIBlog with a duration of hours minute second in good quality, which was uploaded by the user ATIBlog 19 November 2017, share the link with friends and acquaintances, this video has already been watched 1,171 times on youtube and it was liked by 22 viewers. Enjoy your viewing!