Re: About printing functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 21, 2009 at 08:49:46PM +0200, Thodoris wrote:

<snip>

>
> Well Jason my point is theoretical. Lets just say that this function
> doesn't just print "blah blah blah" but like tones of html that you may
> like to reuse...
>
> Well you could always change it to this:
>
> function print_str() {
>    $str = "blah blah blah";
>    return $str;
> }
>
> and use the output you got from the function whenever you like (print
> it, make it a toast, cook it with bees etc).
>
> But the question still remains: Is there a way to do this?

The only way to save this text off is to put it in a $_SESSION variable
or cookie, at least if you want to save it beyond the present page. Oh,
you could also store it in a database.

Paul

-- 
Paul M. Foster

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux