Hello I'm doing a software to send Emails in PHP. The person has a form and it sends HTML through a link. But here I will put a simple HTML.
$texto = "<!DOCTYPE HTML>
<html lang='pt-br'>
<head>
<meta charset='UTF-8'>
<link rel='stylesheet' type='text/css' href='estilo.css'>
<title></title>
</head>
<body>
<!--conteúdo do BODY -->
<!--Tag a ser inserida -->
</body>
</html>";
What I want is to insert a tag at the end of the body tag before / body .
<table class="dashedBorder" width="100%" cellspacing="0" cellpadding="0" border="0" align="center" style="width: 550">
<tbody>
<tr>
<td valign="middle" align="center" style="FONT-FAMILY: Arial; WHITE-SPACE: normal; FONT-SIZE: 11px">
<font color="#444444">Esse email foi enviado para [email protected] para parar de receber e-mails clique <a href="">aqui</a> </font>
</td>
</tr>
<tr> </tr>
<tr>
</tbody>
</table>
How can I do this in PHP? Taking into account that every $ text file will have a / body within the variable?