1// Declare an array and initialize it
2$non_empty_array = array('apples' => '2');
3
4// Declare an empty array
5$empty_array = array();
6
7// Condition to check array is empty or not
8if(!empty($non_empty_array)) {
9 echo "Given Array is not empty <br>";
10}
11if(empty($empty_array)) {
12 echo "Given Array is empty";
13}