Arrays

sizeof()


$fruits = ["lemon", "orange", "banana", "apple"];
var_dump(sizeof($fruits)); //=> int(4)

sort()


$fruits = ["lemon", "orange", "banana", "apple"];
sort($fruits);
var_dump($fruits);
//=>
// array(4) {
//   [0]=> string(5) "apple"
//   [1]=> string(6) "banana"
//   [2]=> string(5) "lemon"
//   [3]=> string(6) "orange"
// }