Email Form Notofication to only include populated fields

I am using the Advanced Forms addon with Concrete5 and I have used it to build a rather long form. The client only wants the email notification that gets sent to him to include the fields that have been filled out. I contacted the developer of Advanced Forms and he gave me an answer. Basically change this line of code:

if(!$field->excludeFromEmail) {
to
if((!$field->excludeFromEmail) && ($this->answers[$field->ffID][‘value’] != ‘’)) {

The problem is with dropdowns. In order to make the first entry in a dropdown not have a selection made, I need to either create an empty entry or use generic text. For example:

non-breaking space character
1
2
3
etc

OR

–Please Select a Quantity–
1
2
3
etc

For whatever reason, the code above doesn’t recognize the non breaking space as an empty field. So I’m trying to figure out how to get an OR statement in the code. I tried:

if((!$field->excludeFromEmail) && ($this->answers[$field->ffID][‘value’] != ‘’) OR ($this->answers[$field->ffID][‘value’] != ‘–Please Select a Quantity–’)) {
and
if((!$field->excludeFromEmail) && ($this->answers[$field->ffID][‘value’] != ‘’) || ($this->answers[$field->ffID][‘value’] != ‘–Please Select a Quantity–’)) {

Neither of these options worked either.

So my question, how do I create a proper OR statement to get this to work? Here’s more of the function:

public function sendNotification($to) {

        $f = sixeightform::getByID($this->fID);
        $fields = $f->getFields();

        $emailData = '';

        if($f->properties['sendData']) {
            foreach($fields as $field) {
                // if(!$field->excludeFromEmail) {
            if((!$field->excludeFromEmail) && ($this->answers[$field->ffID]['value'] != '')) {
                    if($field->type == 'Credit Card') {
                        $emailData .= $field->label . "\

XXXX

";
} elseif(($field->type == ‘File Upload’) || ($field->type == ‘File from File Manager’)) {
$file = File::getByID($this->answers[$field->ffID][‘value’]);
$fv = $file->getApprovedVersion();
$emailData .= strip_tags($field->label) . "
";
$emailData .= BASE_URL . $fv->getRelativePath() . "

";
} else {
$emailData .= strip_tags($field->label) . "
";
$emailData .= strip_tags($this->answers[$field->ffID][‘value’]) . "

";
}
}
}

Change the || in &&

if((!$field->excludeFromEmail) && ($this->answers[$field->ffID]['value'] != '') && ($this->answers[$field->ffID]['value'] != '--Please Select a Quantity--')) {

You want the value to be different from ‘’ AND different from ‘–Please Select a Quantity–’

Thanks. That worked.