This function performs sorting on the given array and arranges the keys of the array in descending order. This example prints the array using a foreach loop and outputs the result as before sorting and after sorting. This function performs sorting on the given array and arranges the keys of the array in ascending order. This example prints the array using a foreach loop and outputs the result as before sorting and after sorting.Ĭode: //example to perform people_ages array This function performs sorting on the given array and arranges the array’s values in a descending array. Also, the sorting is performed with values and not keys.Ĭode : //example to perform people_ages array This function performs sorting on the given array and arranges the array’s values in ascending order, opposite of what sort() function does. $people= array('Rama', 'James', 'Mary', 'Alice', 'Radha') Also, the sorting is performed with values.ī. This function performs sorting on the given array and arranges the elements of the array in descending array, opposite of what sort() function does. This function performs sorting on the given array and arranges the elements of the array in ascending array. Let us learn about each function in detail 1.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |