Re: HTML in PHP to a File
| From: | MikeA | Date: | Fri, 14 Jan 2005 19:58:30 +0000 |
| Subject: | Re: HTML in PHP to a File | ||
| References: | 1 2 3 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-25333@lists.php.net to get a copy of this message | ||
Thanks. I will try the eval. Appreciate the help.!
Mike
"Jason Barnett" <jason.barnett@telesuite.com> wrote in message
news:20050113142826.11750.qmail@pb1.pair.com...
*Warning* I don't really suggest that you use eval() unless absolutely
necessary. But in this case it does what I *think* you want it to do.
http://www.php.net/manual/en/function.eval.php
Luis Moreira wrote:
> What do you mean by "it doesn't work" ?
> It does (the minitest, I mean).
>
> Luis
>
> MikeA wrote:
>
>> I have a PHP file that outputs HTML to the Internet to a user. The
>> user also wants to be able to
>> print that output to a printer. The user wants it formatted with page
>> breaks in the proper place
>> and so on. Using one PHP script to do both, short of a line to
>> display and a line to print, is
>> there a way to do this easily or am I in a pond of alligators? Most
>> of the output is using an echo
>> statement. I thought of trying to take a var and set it top echo or
>> write according to what is
>> needed at that time. Here is my minitest.
>>
>> <?php
>> echo "<P>The test is starting";
>>
>> $echowrite = "echo ";
>>
>> $echowrite."<P>This is the first line.";
eval ($echowrite);
>>
>> echo "<P>You should have seen the first line by now.";
>>
>> ?>
--
Teach a person to fish...
Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html
PHP Manual: http://www.php.net/manual/en/index.php
php-general archives: http://marc.theaimsgroup.com/?l=php-general&w=2
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php