Philip Hallstrom wrote:
> http://us2.php.net/eval
Pay close attention to the oft-used quote from Rasmus Lerdorf:
"If eval() is the answer, you're almost certainly asking the
wrong question"
David
--
David Grant
http://www.grant.org.uk/
--
PHP General Mailing List (http://www.php.net/)
To unsu
If I have
$myStr = "$a * $b";
and I pass it as an argument
$result = myFunction($myStr);
function myFunction($var) {
$a = getData(1);
$b = getData(2);
return // Use $var
}
Is there a way to use $var to process $a and $b?
http://us2.php.net/eval
--
PHP General Mailing List (http://www.p
Hey!
Shaun, I'm really glad to say that I finally solved the problem I had with
"executing a string
that contains both HTML and PHP inside it", and it's all thanks to you!
Thank you very much -
Aviv Revach
At 10:37 15/03/01 -0500, you wrote:
>Hey, I glanced over your message, and you can
On Wednesday 14 March 2001 16:26, you wrote:
> Hey!
>
> I would like to thank you and Mark for your quick reply.
>
> What am I trying to accomplish is the following:
>
>I have created an engine which separates my website's code and
> design. The code is stored in one file(code.txt) and the des
Hey!
I would like to thank you and Mark for your quick reply.
What am I trying to accomplish is the following:
I have created an engine which separates my website's code and design.
The code is stored in one file(code.txt) and the design in
another(design.txt).
The engine loads up pa
> -Original Message-
> From: Aviv Revach [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 13, 2001 5:36 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Executing a string with both html and php inside it..
>
>
> What should I do in order to execute the next string:
>$str = "\n"
>$st
On Wednesday 14 March 2001 12:50, you wrote:
> My string contains HTML tags with PHP code inside(in ''
> tags), not only PHP as eval() requires.
>
> Do you have any other suggestion?
AFAIK there's no other way than using include().
Why do you need that anyway?
> > > What should I do in order t
Hey!
The function 'eval()' can't be used here.
I already tried working with it and failed.
eval() is being used for running PHP code.
My string contains HTML tags with PHP code inside(in '' tags),
not only PHP as eval() requires.
Do you have any other suggestion?
Thank you in advance -
Av
Aviv,
eval()
http://www.php.net/manual/en/function.eval.php
Best regards,
Andrew
On 3/13/01 6:35 PM, "Aviv Revach" <[EMAIL PROTECTED]> wrote:
> Hey!
>
> What should I do in order to execute the next string:
> $str = "\n"
> $str .= "blabla\n";
> $str .= " \n";
> $str .= "blabla\n";
> $
9 matches
Mail list logo