I have a varchar php variable that has an html. It consists of a table, in that table there is a class "disappears", I wanted all tags that had this class to be taken 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>
";
Then:
$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>
";