<?php if( empty($x) ) { echo "x is empty"; } else echo "x is not empty"; $x = 7; if( empty($x) ) { echo "x is empty"; } else echo "x is not empty"; ?>