<?php // Example 1 $string=""; if(empty($string)) echo "Empty string"; else echo "Not an empty string"; //Empty string ?> <?php // Example 2 $strng="Test"; if(empty($strng)) echo "Empty string"; else echo "Not an empty string"; //Not an empty string ?>