Re: [PHP] Executing a string

2006-01-09 Thread David Grant
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

Re: [PHP] Executing a string

2006-01-09 Thread Philip Hallstrom
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

[PHP] Executing a string

2006-01-09 Thread Todd Cary
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? Todd -- PHP General Mailing List (http://www.php.net/) To unsub

Re: [PHP] Executing a string with both html and php inside it..

2001-03-17 Thread Aviv Revach
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

Re: [PHP] Executing a string with both html and php inside it..

2001-03-15 Thread Christian Reiniger
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

Re: [PHP] Executing a string with both html and php inside it..

2001-03-15 Thread Aviv Revach
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

RE: [PHP] Executing a string with both html and php inside it..

2001-03-15 Thread Mark Roedel
> -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

Re: [PHP] Executing a string with both html and php inside it..

2001-03-15 Thread Christian Reiniger
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

Re: [PHP] Executing a string with both html and php inside it..

2001-03-15 Thread Aviv Revach
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

Re: [PHP] Executing a string with both html and php inside it..

2001-03-14 Thread Andrew Hill
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"; > $

[PHP] Executing a string with both html and php inside it..

2001-03-14 Thread Aviv Revach
Hey! What should I do in order to execute the next string: $str = "\n" $str .= "blabla\n"; $str .= " \n"; $str .= "blabla\n"; $str .= "\n"; When I tried using 'echo' with the string, but the php code didn't work... Is there any way of doing this without writing this string to a