I have a bunch of form fields that I want to check if they're empty.

I could have a bunch of
PHP Code:
if (empty($_POST['field1'])
{
echo 
"it was empty";

could I like loop through all my form and then echo "You didn't fill out $missingfeildname";

?