Question:Which functions are used to add and remove array elements? 

Answer There are four functions used to add to and remove from array elements. these are-

1. array_unshift():function adds element to the front of the array.
2. array_push(): function adds element to the end of an array.
3. array_shift(): function removes and returns the first item found in an array.
4. array_pop():function removes and returns the last element from an array. 


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: 576
Which functions are used to add and remove array elements?
Copyright © 2024. Powered by Intellect Software Ltd