0
I have a php varchar variable that has an html. There is a table, in this table in the 'td' there is a class "disappear", I wanted all the tags that possessed this class to be removed from the php variable.
Before:
$varaiavel = "
<table>
<tr class="header">
<td class="check"></td>
<td class="campo_grid_1 desaparecer">Código</td>
<td class="campo_grid_2" style="width:30%">Nome do professor</td>
<td class="campo_grid_3" style="width:30%">Coordenação</td>
<td class="campo_grid_4" style="width:10%">Telefone</td>
<td class="campo_grid_5" style="width:20%">Email</td>
</tr>
<tr>
<td class="check"></td>
<td class="campo_grid_1 desaparecer">12</td>
<td class="campo_grid_2" style="width:30%">Paulo Rodolfo</td>
<td class="campo_grid_3" style="width:30%">(63)33131221</td>
<td class="campo_grid_4" style="width:10%">T(63)33131221</td>
<td class="campo_grid_5" style="width:20%">paulo.webrall</td>
</tr>
";
Afterward:
$varaiavel = "
<table>
<tr class="header">
<td class="check"></td>
<td class="campo_grid_2" style="width:30%">Nome do professor</td>
<td class="campo_grid_3" style="width:30%">Coordenação</td>
<td class="campo_grid_4" style="width:10%">Telefone</td>
<td class="campo_grid_5" style="width:20%">Email</td>
</tr>
<tr>
<td class="check"></td>
<td class="campo_grid_2" style="width:30%">Paulo Rodolfo</td>
<td class="campo_grid_3" style="width:30%">(63)33131221</td>
<td class="campo_grid_4" style="width:10%">T(63)33131221</td>
<td class="campo_grid_5" style="width:20%">paulo.webrall</td>
</tr>
";
thank you ......
– Paulo Rodolfo