Sunday, February 4, 2018

PHP ARRAY FUNCTIONS

                                         PHP ARRAY FUNCTION



The array functions are allowed to you manipulate arrays in the programming campaign, PHP supports both simple and multi-dimensional arrays.

         In general, functions are used to reduce the size of the program.



S.no       Function                                                        Description

1.            array( )                                                Creates an array

2.            array change key case( )                    returns an array with all keys in lowercase or                                                                                           uppercase

3.           array chunk( )                                    Splits an array into chunks of arrays

4.          array combine( )                                 Creates an array by using one array for keys and                                                                                       another for its values

5.          array count values( )                           Returns an array with the number of occurrences for                                                                               each value

6.        array diff( )                                           Compares array values and returns the difference

7.        array fill( )                                            Fills an array with values

8.        array filter( )                                        Filter elements of an array using a user-made function

9.       array flip( )                                           Exchanges all keys with their associated values in an
                                                                        array

10.    array intersect( )                                   Compares array values and returns the matches

11.    array intersect assoc( )                         Compares array key and values and returns the matches

12.    array intersect key( )                            Compares arrays keys, and returns the matches

13.    array key exists ( )                                Checks if the specified key exists in the array

14.   array keys( )                                           Returns all the keys of an array

15.   array merge( )                                         Merges one or more arrays into one array

16.   array merge-recursive( )                         Merges one or more arrays into one array

17.   array multi sort( )                                    Sorts multiple or multi-dimensional arrays

18.   array pad( )                                              Inserts a specified number of items, with a specified                                                                                value  to an array

19.   array pop( )                                             Deletes the last element of an array

20.   array product( )                                       Calculates the products of the values in an array

21.   array push( )                                            Inserts one or more elements to the end of an array

22.   array rand( )                                            Returns one or more random keys from an array

23.   array reverse( )                                       Returns an array in the reverse order.

24.  arsort( )                                                   Sorts an array in reverse order and maintain index                                                                                     association                                               

25. asort( )                                                      Sort an array and maintain index association                   

.   


No comments:

Post a Comment

A R Murugadoss --- Film Career and Biography

         A R Murugadoss --- Film Career a Biography  Early Life :          A.R Murugadoss was Born on 25th September in the Year o...