ronaldo cr ronaldo cr - 1 year ago 66
PHP Question

place html inside php code the right way and that works

i am trying to make html works and the right way to place it so it works placing html inside php code

<?php echo <td class=\"network\">".$show."</td>;?>

Answer Source

This does not give the impression that you've really tried much, or researched the issue.

<?php echo "<td class=\"network\">".$show."</td>";?>

^^ Should work to output HTML tags. (Though invalid as td should exist inside tables.)

Also note you can use different quotes to reduce the need for escaping. E.g.

<?php echo '<td class="network">'.$show.'</td>';?>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download