Here's what you wrote, 01-01-10:
>Try this:
>
>function my_eval($code) {
>ob_start();
>eval($code);
>$retval = ob_get_contents();
>ob_end_clean();
>return $retval;
>}
>
>$str = my_eval("echo 2+2;");
>echo $str;
Mr. Lerdorf, Mr. McClahahan, Mr. Butzon et al,
Thank you for you
Try this:
function my_eval($code) {
ob_start();
eval($code);
$retval = ob_get_contents();
ob_end_clean();
return $retval;
}
$str = my_eval("echo 2+2;");
echo $str;
-Rasmus
On Thu, 11 Jan 2001, Kristofer Widholm wrote:
> Here's what you wrote, 01-01-11:
>
> > > $s = sprintf("%s
your question well?
Cheers,
Maxim Maletsky
-Original Message-
From: Kristofer Widholm [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 11, 2001 3:20 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re-engineering print()
Here's what you wrote, 01-01-11:
> > $s = sprintf("
D]>
To: "Kristofer Widholm" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, January 11, 2001 5:37 PM
Subject: Re: [PHP] Re-engineering print()
> On Wed, 10 Jan 2001, Kristofer Widholm wrote:
>
> > Basically, I'm wondering if there is a way to redire
On Wed, 10 Jan 2001, Kristofer Widholm wrote:
> Basically, I'm wondering if there is a way to redirect print and echo
> output from PHP to a variable instead of directly to a browser or
> file stream. What I'm trying to do is create code that can generate
> an HTML page to a variable that I ca
ssage -
From: "Kristofer Widholm" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 11, 2001 5:19 PM
Subject: Re: [PHP] Re-engineering print()
> Here's what you wrote, 01-01-11:
>
> > > $s = sprintf("%s", implode("
terpart to eval()...
Gfunk
My name was Brian McGee,
I stayed up listening to Queen,
When I was seventeen.
http://www.gfunk007.com/
- Original Message -
From: "Kristofer Widholm" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 1
riable.
--Toby
- Original Message -
From: "Kristofer Widholm" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 11, 2001 1:19 AM
Subject: Re: [PHP] Re-engineering print()
> Here's what you wrote, 01-01-11:
>
> > > $s = sprintf(&q
Here's what you wrote, 01-01-11:
> > $s = sprintf("%s", implode("\n", file('template.php')));
>
>Why this??? It's redundant, isn't it? Wouldn't
>
>$s= implode("\n", file('template.php')); do it?
>
>Gfunk
Gfunk, and Mr. Murray,
I guess I didn't write my query very clearly. What I am looking for
> $s = sprintf("%s", implode("\n", file('template.php')));
Why this??? It's redundant, isn't it? Wouldn't
$s= implode("\n", file('template.php')); do it?
Gfunk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
> #Option 1: code I wish worked
> $s = include("phpcode.php");
>
> #Option 2: also code I wish worked
> $s = sprintf("%s", include('template.php'));
$s = sprintf("%s", implode("\n", file('template.php')));
:)
Jason
--
Jason Murray
[EMAIL PROTECTED]
Web Design Team, Melbourne IT
Fetch the com
Hi, I'm involved in a conundrum that is a little difficult to explain
with plain English. Perhaps some PHP code will help you understand
what I am attempting:
#Option 1: code I wish worked
$s = include("phpcode.php");
#Option 2: also code I wish worked
$s = sprintf("%s", include('template.php'
Hi, I'm involved in a conundrum that is a little difficult to explain
with plain English. Perhaps some PHP code will help you understand
what I am attempting:
#Option 1: code I wish worked
$s = include("phpcode.php");
#Option 2: also code I wish worked
$s = sprintf("%s", include('template.php'
13 matches
Mail list logo