Source Code:
(back to article)
<?php // Declare an empty array $empty_array = []; // Use array index to check // array is empty or not if (sizeof($empty_array) == 0) { echo "Empty Array"; } else { echo "Non-Empty Array"; } ?>
Result:
Report an issue