Good afternoon,
How to do an if within variable value assignment.
$html ='
<body>
<table width="100%" style="background:#00aeef;">
<tr><td>
<table width="596" border="0" align="center" cellpadding="0" cellspacing="0" style="font-family:Arial;background:#FFF;">
<tr>
<td height="78" colspan="2"><img name="index_r1_c1" src="email/img/index_r1_c1.png" width="595" height="78" id="index_r1_c1" alt="" /></td>
</tr>
<tr>
<td height="200" colspan="2" valign="top" style="font-size:16px;padding:30px 15px;font-family:Arial;"><h3>Olá,</h3>
<h3> O Cliente abaixo se interessou por um de seus itens publicados no jornal, seguem os dados dele:</h3>
<strong>Nome</strong>: '.$nome.'<br>'.
if($email != ""){
<strong>E-Mail</strong>: '.$email.'<br>;
}
if($whatsapp != ""){
<strong>WhatsApp</strong>: '.$whatsapp.'<br>;
}.'
<h3>Segue abaixo informações sobre o imóvel:</h3>
In case $ html is mounting the body of an email and would like only the field ($ email, $ whatsapp) to appear if it is different from empty.