1
Hello I am making a software to send Emails in PHP. One has a form and she sends HTML by 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 tag body before the /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 file in the $text will have a /body within the variable?
Why you showed how to display the text?
– Oeslei
But this function gives support to replace the HTML string in addition to printing it?
– Felipe Jorge
I failed to understand the question, the @Oeslei solution is what you need. I thought you wanted to print HTML in text.
– Rafael Almeida
All right, your answer is very useful despite this. =)
– Felipe Jorge