<?php

$email = "foo@bar.com";
$whatsapp = "";

$html = "<h1>Aqui começa seu HTML</h1>" .
        (($email != "") ? "<strong>E-mail: {$email}</strong>" : "") .
        (($whatsapp != "") ? "<strong>WhatsApp: {$whatsapp}</strong>" : "");

echo $html;