I have a form I'm putting together. The processing will be on a PHP
script that will take all the field names and print them out on the
email it sends to me. No problem there. But what I'd like to do is have
it exclude printing the field name and value when there are any blank
values in the field.
The processing part of the script is this:
if (is_array($val)) {
for ($z=0;$z<count($val);$z++) {
$content .= "$key: $val[$z]\n";
}
} else {
$content .= "$key: $val\n";
}
How would I adapt this to not print a field name with a blank value?
Thanks.