Re: neat html output
| From: | Toby Miller | Date: | Wed, 31 Jan 2001 15:14:43 +0000 |
| Subject: | Re: neat html output | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-37489@lists.php.net to get a copy of this message | ||
Mark,
The closest way that I know of to accomplish this is to print them more like
you would HTML. So in other words, you can do this:
<?php
print '
<html>
<head>
<title>$title</title>
</head>
<body>
$content
</body>
</html>
';
?>
or like this:
<html>
<head>
<title><?php print $title ?></title>
</head>
<body>
<?php print $content ?>
</body>
</html>
The only way around these methods that I've seen are using template wrapper
objects and creating the whole thing that way.
Toby
----- Original Message -----
From: "Joe Sheble (Wizaerd)" <JustForMailingLists@wizaerd.com>
To: <php-general@lists.php.net>
Sent: Wednesday, January 31, 2001 9:49 AM
Subject: Re: [PHP] neat html output
> oops, that function declaration should look like:
>
> function println( $cTextToPrint ) {
> print( $cTextToPrint . chr(13) );
> }
>
>
> At 07:40 AM 1/31/01 -0700, Joe Sheble (Wizaerd) wrote:
>
> >Write yourself a function that handles it yourself and include it in
every
> >page... something such as:
> >
> >function println( $cTextToPrint ) {
> > print( $cTextToPrint . "<BR>" );
> >}
> >
> >then in your pages just use println() everywhere...
> >
> >At 08:29 AM 1/31/01 -0600, Mark wrote:
> >>I'd like my html output to be neatly written, including newlines is
helpful
> >>but does anyone know of a better way to output newlines than appending
> >>."\n"; to every echo statement.
> >>
> >>-Mark
> >>
> >>
> >>
> >>
> >>--
> >>PHP General Mailing List (http://www.php.net/)
> >>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> >>For additional commands, e-mail: php-general-help@lists.php.net
> >>To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
> >
> >--
> >PHP General Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> >For additional commands, e-mail: php-general-help@lists.php.net
> >To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net