Re: include "problem"
| From: | Rasmus Lerdorf | Date: | Fri, 27 Dec 2002 03:10:29 +0000 |
| Subject: | Re: include "problem" | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129404@lists.php.net to get a copy of this message | ||
Use a here-doc:
echo <<<EOB
<br>[$data] <br> $titulo <br>($user)<br> $intro <br> $texto
<br><br> (comentarios=$contador)<br><br><hr size=1
width=90%><br>
EOB;
-Rasmus
On Fri, 27 Dec 2002, Pag wrote:
>
> Hi,
>
> i am trying to make my work a little easier when editing the appearance of
> a news site i am building. As it is, everytime i want to change the looks
> of how each news appears, i have to edit inside the print(' '); which is
> annoying, because of the backslash with " problem thing(when i need to have
> a " inside a print, i need to put a \, you know), for example:
>
> i have:
>
> print("<br>[$data] <br> $titulo <br>($user)<br> $intro <br>
> $texto
> <br><br> (comentarios=$contador)<br><br><hr size=1
> width=90%><br>");
>
> Cant i do something like having the code inside the print on an external
> file? so when i want to change something, i only edit that file, instead of
> dealing with the print itself, like this:
>
> [some command(s) that put the content of the external file "looks.inc" in
> variable $a]
> print ("$a");
>
> I dont even know what to look for in the net. This problem is so i, later
> on, can code some sort of backend in the ways of greymatter, that people
> can change the looks of the news entries by themselves.
>
> Thanks.
>
> Pag
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>