emptying an array php code example
Example 1: array empty check in php
if (empty($array)) {
// list is empty.
}
Example 2: declare empty array in php
$emptyArray = [];
$emptyArray = array();
$emptyArray = (array) null;
if (empty($array)) {
// list is empty.
}
$emptyArray = [];
$emptyArray = array();
$emptyArray = (array) null;