3. INTRODUCTION
FUNCTION: A function is a set of code, that takes a finite
number of input and optionally returns a value.
BUILT IN FUNCTION: A function that is built into
an application and can be accessed by end-users.
4. BUILT IN FUNCTION in PHP
Built in functions are functions that exist in PHP
installation package.
These built in functions are what make PHP a very
efficient and productive scripting language.
There are more than 1,000 inbuilt functions into the
standard PHP distribution. Apart from these, we can define
own functions according to the requirements.
The built in functions can be classified into many
categories. Below is the list of the categories.
7. SORT()
This built in function sorts the array in ascending order.
By default the sorting behavior will reorganize an array alphabetically or
numerically.
SYNTAX
Sort($array, $sort_flags)
Where:
$array – the array in which you wish to sort
$sort_flags - (optional) modifies the sorting behavior.