Re: print actual html code to browser
| From: | Michael Sweeney | Date: | Wed, 07 Aug 2002 17:06:34 +0000 |
| Subject: | Re: print actual html code to browser | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-111539@lists.php.net to get a copy of this message | ||
Simplest way is to replace the < brackets with the entity string (<)
in the tags that you want to print. It won't be rendered as html then.
..mike..
On Wed, 2002-08-07 at 10:03, Jim Long wrote:
> Hi,
>
> I've done this by mistake in the past but can't seem to make it work
> now. I want to print this html in a browswer (don't ask why...).
>
> I want the following to show as actual html viewed in a browswer window
> with a <pre> tag not shown so that it will hold the format. I want the
> varibles to still work like varibles though.
>
> echo
>
> "<p><table border='0' cellpadding='2'
> cellspacing='0'>
> <tr>
> <td bgcolor='#6600cc'>
> <table border='0' cellpadding='3' cellspacing='0'
> bgcolor='white'>
> <tr>
> <td>
> <table border='0' cellpadding='3' cellspacing='0'
> bgcolor='white'>
> <tr>
> <td>$first_name</td>
> <td>$last_name</td>
> <td>-</td>
> <td>Ave (+/- par):</td>
> <td>$ave</td>
> <td>-</td>
> <td>Rank:</td>
> <td>$i</td>
> </tr>
> </table>
> </td>
> </tr>
> <tr>
> <td>
> <table border='0' cellpadding='3' cellspacing='0'
> bgcolor='white'>
> <tr>
> <td>$s1</td>
> <td>$s2</td>
> <td>$s3</td>
> <td>$s4</td>
> <td>$s5</td>
> </tr>
> </table>
> </td>
> </tr>
> </table>
> </td>
> </tr>
> </table></p>";
>
> Thanks,
> Jim
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php