In PHP, an array is a collection of values that can be of any data type, such as strings, integers, floats, or even other arrays. Arrays can be indexed by a numeric index or a string index, and can be of fixed size or dynamic size.
To create an array in PHP, you can use the
array()
function, which takes any number of
comma-separated values and returns an array containing those values. For example, the following code creates an array with three elements :
$myArray = array("apple", "banana", "orange");​