Question: Difference between array_merge() and array_slice()?

 

Answer The array_merge() function merges one ore more arrays into one array. This function returns one array with the elements of all the parameter arrays.

Syntax is array_merge(array1,array2,array3...)
The array_slice () function returns a section of an array based on a starting and ending offset value.
Syntax is array_slice(array,start,length,preserve)

 


Deprecated: html_entity_decode(): Passing null to parameter #1 ($string) of type string is deprecated in D:\webserver\www\vcampusbd_com_https\answers\column_answer_two.php on line 128
+ Report
Total Preview: 548
 Difference between array_merge() and array_slice()?

Copyright © 2024. Powered by Intellect Software Ltd