0
I did it two ways:
wanted to tag <td>
in abreTD and </td>
in the close when I printit on the page, the problem is if I just put the tags, they disappear.
while ($campo = mysql_fetch_assoc($query)) {
$coluna = $campo["Field"];
echo '$html .= ' . '\'abreTD\''. ' . ' . '$'. $coluna . ' . ' . '\'fechaTD\''. ';';
echo "<br>";
}
The only way I found to print is by creating a textarea and having it printed in, then it works, the problem is that it doesn’t have the line breaking, how do I print inside the textarea with line break? I tried to do
echo nl2br('$html .= ' . '\'<td>\''. ' . ' . '$'. $coluna . ' . ' . '\'</td>\''. ';');
but it didn’t work out.
echo "<textarea class='textoarea' style='width: 100%; height: 60%;'>";
while ($result = mysql_fetch_assoc($query)) {
$coluna = $result["Field"];
echo '$html .= ' . '\'<td>\''. ' . ' . '$'. $coluna . ' . ' . '\'</td>\''. ';';
}
echo "</textarea>";
try to use the function htmlentities with
echo htmlentities('<td>....')
– Pedro Sanção