Re: [PHP] eval and HEREDOC

2010-07-21 Thread Peter Lind
21, 2010 at 12:49 AM, Daevid Vincent dae...@daevid.com wrote: -Original Message- From: Sorin Buturugeanu [mailto:m...@soin.ro] Sent: Tuesday, July 20, 2010 2:11 PM To: php-general@lists.php.net Subject: [PHP] eval and HEREDOC Hello, I am having trouble with a part of my

Re: [PHP] eval and HEREDOC

2010-07-21 Thread Sorin Buturugeanu
[mailto:m...@soin.ro] Sent: Tuesday, July 20, 2010 2:11 PM To: php-general@lists.php.net Subject: [PHP] eval and HEREDOC Hello, I am having trouble with a part of my templating script. I'll try to explain: The template itself is HTML with PHP code inside it, like: div

[PHP] eval and HEREDOC

2010-07-20 Thread Sorin Buturugeanu
Hello, I am having trouble with a part of my templating script. I'll try to explain: The template itself is HTML with PHP code inside it, like: div?=strtoupper($user['name']);?/div And I have the following code as part of the templating engine: $template = file_get_contents($file); $template

RE: [PHP] eval and HEREDOC

2010-07-20 Thread Daevid Vincent
-Original Message- From: Sorin Buturugeanu [mailto:m...@soin.ro] Sent: Tuesday, July 20, 2010 2:11 PM To: php-general@lists.php.net Subject: [PHP] eval and HEREDOC Hello, I am having trouble with a part of my templating script. I'll try to explain: The template itself

Re: [PHP] eval and HEREDOC

2010-07-20 Thread Sorin Buturugeanu
wrote: -Original Message- From: Sorin Buturugeanu [mailto:m...@soin.ro] Sent: Tuesday, July 20, 2010 2:11 PM To: php-general@lists.php.net Subject: [PHP] eval and HEREDOC Hello, I am having trouble with a part of my templating script. I'll try to explain: The template

Re: [PHP] eval and HEREDOC

2010-07-20 Thread lists
: -Original Message- From: Sorin Buturugeanu [mailto:m...@soin.ro] Sent: Tuesday, July 20, 2010 2:11 PM To: php-general@lists.php.net Subject: [PHP] eval and HEREDOC Hello, I am having trouble with a part of my templating script. I'll try to explain: The template itself

Re: [PHP] eval and HEREDOC

2010-07-20 Thread Sorin Buturugeanu
: -Original Message- From: Sorin Buturugeanu [mailto:m...@soin.ro] Sent: Tuesday, July 20, 2010 2:11 PM To: php-general@lists.php.net Subject: [PHP] eval and HEREDOC Hello, I am having trouble with a part of my templating script. I'll try to explain: The template itself is HTML

[PHP] eval uquestion

2008-03-19 Thread chetan rane
HI All I have the follwoing code function cleanufx($str){ return ucase($str); } $value=xyz; $var =ufx; $fn=clean$var($value); $val =eval($fn;); echo $val; can anyone tell me what is wrong in this as the eval is returning 0 (false); -- Have A pleasant Day Chetan. D. Rane

Re: [PHP] eval uquestion

2008-03-19 Thread Andrew Ballard
On Wed, Mar 19, 2008 at 3:22 PM, chetan rane [EMAIL PROTECTED] wrote: HI All I have the follwoing code function cleanufx($str){ return ucase($str); } $value=xyz; $var =ufx; $fn=clean$var($value); $val =eval($fn;); echo $val; can anyone tell me what is

[PHP] Re: PHP eval() fatal error

2007-08-27 Thread Maarten Balliauw
When re-writing this example to a form of create_function, the same problem occurs: ?php $code = ' return 12*A+; '; // Clearly incorrect code :-) $returnValue = 0; // Evaluate formula try { $temporaryCalculationFunction = @create_function('', $code); // E_ERROR here if

Re: [PHP] Re: PHP eval() fatal error

2007-08-27 Thread Richard Lynch
On Mon, August 27, 2007 12:59 am, Maarten Balliauw wrote: Now let's repeat my question: is there any way to gracefully evaluate specific code, eventually catch an error and respond to that, without using parsekit() or launching another process to get this done? I missed that you had an E_ERROR

Re: [PHP] PHP eval() fatal error

2007-08-26 Thread Richard Lynch
On Mon, August 20, 2007 8:54 am, Maarten Balliauw wrote: Here's the thing: I'm trying to do some dynamic code compilation within PHP using eval(). The code I'm trying to compile raises an E_ERROR (Fatal). Here's a simple example: ?php $code = ' $returnValue = 12*A+; '; // Clearly

[PHP] PHP eval() fatal error

2007-08-20 Thread Maarten Balliauw
Here's the thing: I'm trying to do some dynamic code compilation within PHP using eval(). The code I'm trying to compile raises an E_ERROR (Fatal). Here's a simple example: ?php $code = ' $returnValue = 12*A+; '; // Clearly incorrect code :-) $returnValue = 0; eval($code); ? Now, I'd like

Re: [PHP] PHP eval() fatal error

2007-08-20 Thread Stut
Maarten Balliauw wrote: Here's the thing: I'm trying to do some dynamic code compilation within PHP using eval(). The code I'm trying to compile raises an E_ERROR (Fatal). Here's a simple example: ?php $code = ' $returnValue = 12*A+; '; // Clearly incorrect code :-) $returnValue = 0;

[PHP] Re: PHP eval() fatal error

2007-08-20 Thread M. Sokolewicz
Maarten Balliauw wrote: Here's the thing: I'm trying to do some dynamic code compilation within PHP using eval(). The code I'm trying to compile raises an E_ERROR (Fatal). Here's a simple example: ?php $code = ' $returnValue = 12*A+; '; // Clearly incorrect code :-) $returnValue = 0;

[PHP] Eval To String

2005-12-07 Thread Shaun
Hi, Is it possible to return the result of eval function to a string rather than outputting directly to the browser? Thanks for your advice -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Eval To String

2005-12-07 Thread Jay Blanchard
[snip] Is it possible to return the result of eval function to a string rather than outputting directly to the browser? Thanks for your advice [/snip] Yes. You're welcome. The first freakin' example in TFM http://www.php.net/eval is this; ?php $string = 'cup'; $name = 'coffee'; $str = 'This

Re: [PHP] Eval To String

2005-12-07 Thread David Grant
Shaun Shaun wrote: Is it possible to return the result of eval function to a string rather than outputting directly to the browser? ob_start(); eval('$eval = evil;'); $output = ob_get_clean(); Cheers, David Grant -- David Grant http://www.grant.org.uk/ -- PHP General Mailing List

[PHP] eval();

2005-10-30 Thread John Taylor-Johnston
I need to generate embedded php within in a mysql record. $contents is the actual contents of that record. ?php $contents = div class=\indent\ style=\font-size: 16px; font-family: arial,helvetica; font-weight: bold;\About the Project/div ?php echo \hello world\; ?; echo eval($contents); ? I

Re: [PHP] eval();

2005-10-30 Thread Jasper Bryant-Greene
On Sun, 2005-10-30 at 21:16 -0500, John Taylor-Johnston wrote: I need to generate embedded php within in a mysql record. $contents is the actual contents of that record. ?php $contents = div class=\indent\ style=\font-size: 16px; font-family: arial,helvetica; font-weight: bold;\About the

Re: [PHP] eval();

2005-10-30 Thread John Taylor-Johnston
?php $contents = div class=\indent\ style=\font-size: 16px; font-family: arial,helvetica; font-weight: bold;\About the Project/div ?php echo \hello world\; ?; echo eval($contents); ? eval() expects PHP code, not HTML with embedded PHP code. Try this (untested): eval( ? $contents ?php );

Re: [PHP] eval();

2005-10-30 Thread Jasper Bryant-Greene
On Sun, 2005-10-30 at 21:24 -0500, John Taylor-Johnston wrote: ?php $contents = div class=\indent\ style=\font-size: 16px; font-family: arial,helvetica; font-weight: bold;\About the Project/div ?php echo \hello world\; ?; echo eval($contents); ? eval() expects PHP code, not HTML with

Re: [PHP] eval();

2005-10-30 Thread John Taylor-Johnston
eval( ? $contents ?php ); However, if eval() is the answer, you're probably asking the wrong question. You should take a hard look at your code and think of a better way to do what you need to do. Back to the drawing board? It is either store my html+embedded code in a mysql record, or in

Re: [PHP] eval();

2005-10-30 Thread Richard Lynch
On Sun, October 30, 2005 8:51 pm, John Taylor-Johnston wrote: eval( ? $contents ?php ); However, if eval() is the answer, you're probably asking the wrong question. You should take a hard look at your code and think of a better way to do what you need to do. Back to the drawing board? It

RE: [PHP] eval();

2005-10-30 Thread Josh McDonald
: Re: [PHP] eval(); On Sun, October 30, 2005 8:51 pm, John Taylor-Johnston wrote: eval( ? $contents ?php ); However, if eval() is the answer, you're probably asking the wrong question. You should take a hard look at your code and think of a better way to do what you need to do. Back

[PHP] Eval string to array

2005-01-24 Thread Gerard Samuel
Im trying to evaluate a string representation of the output of var_export(), as an array. To make a long story short, Im using curl to fetch another php page, that uses var_export to echo out php data structures. The fetched data via curl, is a string. Something like - array ( 'foo' = 'bar', )

Re: [PHP] Eval string to array

2005-01-24 Thread Jochem Maas
Gerard Samuel wrote: Im trying to evaluate a string representation of the output of var_export(), as an array. To make a long story short, Im using curl to fetch another php page, that uses var_export to echo out php data structures. The fetched data via curl, is a string. Something like - array

Re: [PHP] Eval string to array

2005-01-24 Thread Gerard Samuel
Jochem Maas wrote: Gerard Samuel wrote: Im trying to evaluate a string representation of the output of var_export(), as an array. To make a long story short, Im using curl to fetch another php page, that uses var_export to echo out php data structures. The fetched data via curl, is a string.

[PHP] eval() with CONSTANTS

2004-05-20 Thread Greg Donald
How can I eval() an HTML template to make a CONSTANT be evaluated properly? Previously I have been using regular $variables in my HTML templates. Today I decided to make one of the $variables a CONSTANT only to find it would not parse out as it's defined value. It is instead treated as regular

Re: [PHP] eval() with CONSTANTS

2004-05-20 Thread Tom Rogers
Hi, Friday, May 21, 2004, 8:26:30 AM, you wrote: GD How can I eval() an HTML template to make a CONSTANT be evaluated GD properly? GD Previously I have been using regular $variables in my HTML templates. GD Today I decided to make one of the $variables a CONSTANT only to find it GD would not

[PHP] eval() question

2004-04-21 Thread OrangeHairedBoy
I would like to use eval() to evaluate another PHP file and store the output of that file in a string. So, let's say, for example, that I have a file called colors.php which contains this: pColors: ? echo Red, Yellow, Green, Blue; ?/p Then, in another file, I have this: $file =

RE: [PHP] eval() question

2004-04-21 Thread Michael Sims
OrangeHairedBoy wrote: I would like to use eval() to evaluate another PHP file and store the output of that file in a string. You could use output buffering to do this a bit more easily, I think: ob_start(); include('colors.php'); $colors = ob_get_contents(); ob_end_clean(); -- PHP General

Re: [PHP] eval() question

2004-04-21 Thread OrangeHairedBoy
While that is an awesome idea, I don't think it will work for me. There's two reasons why. First, colors.php is actually stored in a MySQL server. Second, before the PHP code inside colors.php I want to be able to replace data inside that file. For example: $file = str_replace( Green , Orange ,

Re: [PHP] eval() question

2004-04-21 Thread Marek Kilimajer
OrangeHairedBoy wrote: I would like to use eval() to evaluate another PHP file and store the output of that file in a string. So, let's say, for example, that I have a file called colors.php which contains this: pColors: ? echo Red, Yellow, Green, Blue; ?/p Then, in another file, I have this:

Re: [PHP] eval() question

2004-04-21 Thread OrangeHairedBoy
Marek, OK...that worked...kinda, but it doesn't pass the output to $colors. It echos it. I need the output to be passed to $colors. Lewis Marek Kilimajer [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] OrangeHairedBoy wrote: I would like to use eval() to evaluate another PHP file

RE: [PHP] eval() question

2004-04-21 Thread Michael Sims
OrangeHairedBoy wrote: I would like to use eval() to evaluate another PHP file and store the output of that file in a string. You could use output buffering to do this a bit more easily, I think: ob_start(); include('colors.php'); $colors = ob_get_contents(); ob_end_clean(); While that

Re: [PHP] eval() question

2004-04-21 Thread OrangeHairedBoy
Thanks Michael Marek! It worked! :) Michael Sims [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] OrangeHairedBoy wrote: I would like to use eval() to evaluate another PHP file and store the output of that file in a string. You could use output buffering to do this a bit more

Re: [PHP] eval function

2003-08-23 Thread Matthias Wulkow
Hallo Tom, am Samstag, 23. August 2003 um 05:14 hast Du Folgendes gekritzelt: TR This should do it: TR eval('${content.$databasepagename}[$i]();'); I'm afraid to say it, but it does not :-( Yesterday I was also trying to find some manual pages about eval() which would explain me the syntax.

Re[2]: [PHP] eval function

2003-08-23 Thread Tom Rogers
Hi, Saturday, August 23, 2003, 10:01:54 PM, you wrote: MW Hallo Tom, MW am Samstag, 23. August 2003 um 05:14 hast Du Folgendes gekritzelt: TR This should do it: TR eval('${content.$databasepagename}[$i]();'); MW I'm afraid to say it, but it does not :-( MW Yesterday I was also trying to find

Re: [PHP] eval function

2003-08-23 Thread Matthias Wulkow
Hallo Tom, am Samstag, 23. August 2003 um 17:50 hast Du Folgendes gekritzelt: TR This works for me, what error message do you get? Make sure you use TR single quotes in the eval otherwise the string will get substituted TR before eval gets a look at it. TR ?php TR $contentarray =

Re: [PHP] eval function

2003-08-23 Thread Matthias Wulkow
Hallo Tom, am Samstag, 23. August 2003 um 17:50 hast Du Folgendes gekritzelt: TR Hi, TR Saturday, August 23, 2003, 10:01:54 PM, you wrote: MW Hallo Tom, MW am Samstag, 23. August 2003 um 05:14 hast Du Folgendes gekritzelt: TR This should do it: TR eval('${content.$databasepagename}[$i]();');

Re[2]: [PHP] eval function

2003-08-23 Thread Tom Rogers
Hi, Sunday, August 24, 2003, 2:32:01 AM, you wrote: MW That's the error I find in the apache-log. On the screen, I get MW nothing but a white page. By the way I have error_reporting(E_ALL); MW but I never get errors reported... MW PHP Fatal error: Call to undefined function: () in

[PHP] eval function

2003-08-22 Thread Matthias Wulkow
Hi php-general, I have a question about eval(); I'm having multiple pagenames I store in a database. I also have a lot of functions starting with content and then the name of the pages taken from the database. Ex: pagenames = about,download functions = contentAbout(), contentDownload(). Now I

Re: [PHP] eval function

2003-08-22 Thread Tom Rogers
Hi, Saturday, August 23, 2003, 8:38:32 AM, you wrote: MW Hi php-general, MW I have a question about eval(); MW I'm having multiple pagenames I store in a database. I also have a lot MW of functions starting with content and then the name of the pages MW taken from the database. Ex: pagenames =

[PHP] eval

2003-08-01 Thread Decapode Azur
Is it possible to put PHP code in eval ? Or just vars ? ?php $string = 'The result of ?php $a=2; $b=3; $c=$a+$b; echo $a + $b is $c; ?'; eval ($string); ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] eval

2003-08-01 Thread Adrian
PHP-Code: eval('?'.$string) Vars: eval('$string='.str_replace('','\\',$string).';'); Is it possible to put PHP code in eval ? Or just vars ? ?php $string = 'The result of ?php $a=2; $b=3; $c=$a+$b; echo $a + $b is $c; ?'; eval ($string); ?

Re: [PHP] eval

2003-08-01 Thread Joona Kulmala
Decapode Azur wrote: Is it possible to put PHP code in eval ? Or just vars ? ?php $string = 'The result of ?php $a=2; $b=3; $c=$a+$b; echo $a + $b is $c; ?'; eval ($string); ? It should go like: [code] eval('$var = The result of; $a=2; $b=3; $c = $a + $b; $var .= $a + $b is $c;'); [/code]

[PHP] Eval var from query

2003-07-14 Thread Shawn McKenzie
How can I evaluate a var that is from a text field of a database? Example: MySQL field `name` = hi my name is $name In my script I have: $name = Shawn; After fetching a query result as an associative array I have the contents of the `name` field in $data If I echo $data I get: hi my name is

Re: [PHP] Eval var from query

2003-07-14 Thread Marco Tabini
On Mon, 2003-07-14 at 15:03, Shawn McKenzie wrote: How can I evaluate a var that is from a text field of a database? Example: Hi Shawn-- Have you looked at eval? http://www.php.net/eval. Cheers, Marco -- php|architect -- The Magazine for PHP Professionals NOW AVAILABLE IN PRINT! Get

Re: [PHP] Eval var from query

2003-07-14 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Mon, 14 Jul 2003 at 20:03, lines prefixed by '' were originally written by you. How can I evaluate a var that is from a text field of a database? Example: MySQL field `name` = hi my name is $name In my script I have: $name = Shawn;

Re: [PHP] Eval var from query

2003-07-14 Thread David Nicholson
Hello, This is a reply to an e-mail that you wrote on Mon, 14 Jul 2003 at 20:15, lines prefixed by '' were originally written by you. eval($data) returns Parse error: parse error, unexpected T_STRING in C:appsapache2htdocstestquery.php(23) : eval()'d code on line 1 What are the exact contents

[PHP] Eval or $$ are they the same or is $$ safer

2003-06-11 Thread Jason Lehman
Is $$ the same as eval or is it different and my main question is, is it safer to use to for processing form data? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Eval or $$ are they the same or is $$ safer

2003-06-11 Thread Leif K-Brooks
Use $$ unless you need to use eval. Easier to read, faster to process. Also safer if you don't validate form data. Jason Lehman wrote: Is $$ the same as eval or is it different and my main question is, is it safer to use to for processing form data? -- The above message is encrypted with

Re: [PHP] Eval or $$ are they the same or is $$ safer

2003-06-11 Thread Shawn McKenzie
Can you expand on this? I haven't found a ref to the $$ except for variable variables. $$ What does it do? How is it used? Thanks! Shawn Leif K-Brooks [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Use $$ unless you need to use eval. Easier to read, faster to process. Also safer

Re: [PHP] Eval or $$ are they the same or is $$ safer

2003-06-11 Thread Leif K-Brooks
$$ is perfectly explained in the variable variables section. Shawn McKenzie wrote: Can you expand on this? I haven't found a ref to the $$ except for variable variables. $$ What does it do? How is it used? Thanks! Shawn Leif K-Brooks [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]

[PHP] eval error

2003-03-10 Thread Alawi
what problem I want to use eval in my script but its generate this error : Parse error: parse error, unexpected T_LNUMBER in C:\Projects\phpmag\admin\functions\admin_cont.php(22) : eval()'d code on line 4 Parse error: parse error, unexpected T_LNUMBER in

Re: [PHP] eval error

2003-03-10 Thread Marek Kilimajer
try echo \$all_types_list .= \$all_types_list\;; there should be a syntax error Alawi wrote: what problem I want to use eval in my script but its generate this error : Parse error: parse error, unexpected T_LNUMBER in C:\Projects\phpmag\admin\functions\admin_cont.php(22) : eval()'d code on line

Re: [PHP] eval error

2003-03-10 Thread Chris Hayes
At 12:54 10-3-03, you wrote: what problem I want to use eval in my script but its generate this error : Parse error: parse error, unexpected T_LNUMBER in C:\Projects\phpmag\admin\functions\admin_cont.php(22) : eval()'d code on line 4 eval (\$all_types_list .= \$all_types_list\;); For those

[PHP] eval challenge

2003-03-04 Thread neko
- define a string that has a function call in it (that returns a string) that at the time of declaration is not in scope, eg $str = this is the name : \$node-getName(); // $node is _not_ defined currently, so we can't escape out then, later on in the code, this string will be passed to a

Re: [PHP] eval challenge

2003-03-04 Thread Dan Hardiker
- define a string that has a function call in it (that returns a string) that at the time of declaration is not in scope, eg $str = this is the name : \$node-getName(); // $node is _not_ defined currently, so we can't escape out Ya have 2 options really (from my perspective): 1. Place in

Re: [PHP] eval challenge

2003-03-04 Thread neko
Thanks for your time, Dan. Currently, I'm using defined tags for replacing info from my CMS, eg: $str = ofa-core:siteMapLink/ Then I have a function that has all the objects in scope, and can perform the necessary replacements. I am prototyping some stuff with smarty, but so far have yet to

Re: [PHP] eval challenge

2003-03-04 Thread Dan Hardiker
Currently, I'm using defined tags for replacing info from my CMS, eg: $str = ofa-core:siteMapLink/ Then I have a function that has all the objects in scope, and can perform the necessary replacements. ok ... what would ofa-core:siteMapLink/ represent? The output of $ofa-core-siteMapLink();?

Re: [PHP] eval challenge

2003-03-04 Thread neko
ok ... what would ofa-core:siteMapLink/ represent? The output of $ofa-core-siteMapLink();? If your using XML throughout - have you looked at XSLT transformations? It's just a symbolic name - the output is created from a few different objects within the CMS, but it was such a commonly used set

[PHP] eval help

2003-03-03 Thread neko
Hi guys, My current task involves passing a string into a function that is able to reference variables defined within that function for the final output. The idea is that a function iterates through objects and eval's the string so that the objects data (name etc) is substituted in the string.

Re: [PHP] eval help

2003-03-03 Thread Ernest E Vogelsinger
At 14:47 03.03.2003, neko said: [snip] $someVar = brtesting for node - wootah, \$evalTestArr[TAG_PAGENAME] then in some other function that gets passed this string ... $evalTestArr[TAG_PAGENAME] = hello anna marie gooberfish!; $str = $someVar;

[PHP] eval problem

2002-07-02 Thread Greg Wineman
Hello, Could someone offer some insight on eval(); I am fairly new at this. I would like to evaluate numerous variables from a form submission with a loop, but I can;t even get on to work: I.e. He are the variables from my form wins_1=7 losses_1=0 sort_1=1 wins_2=7 losses_2=4 sort_2=2

Re: [PHP] eval problem

2002-07-02 Thread Analysis Solutions
On Tue, Jul 02, 2002 at 10:19:59PM -0400, Greg Wineman wrote: He are the variables from my form wins_1=7 losses_1=0 sort_1=1 wins_2=7 losses_2=4 sort_2=2 wins_3=7 losses_3=4 sort_3=3 $counter=1; $wins=eval(\$wins_.$counter); eval() is overkill and can be dangerous. I'd use

Re: [PHP] eval problem

2002-07-02 Thread Analysis Solutions
On Tue, Jul 02, 2002 at 10:45:27PM -0400, Analysis Solutions wrote: $var = $wins_$counter; Oops. Forgot to escape the $: $var = \$wins_$counter; --Dan -- PHP classes that make web design easier SQL Solution | Layout Solution | Form Solution

Re: [PHP] eval problem

2002-07-02 Thread Greg Wineman
This doesn't seem to work. Here's my demo. ? $wins_1=7; $losses_1=0; $sort_1=1; $wins_2=4; $losses_2=4; $sort_2=2; $wins_3=3; $losses_3=4; $sort_3=3; $wins = 0; for ($counter=1; $counter=3; $counter++) { $var = $wins_$counter; $wins = $wins + $$var; echo($wins); } ? This returns 000,

Re: [PHP] eval problem

2002-07-02 Thread Greg Wineman
hmm... I must be doing something wrong. This is still returning 000 ? $wins_1=7; $losses_1=0; $sort_1=1; $wins_2=4; $losses_2=4; $sort_2=2; $wins_3=3; $losses_3=4; $sort_3=3; $wins = 0; for ($counter=1; $counter=3; $counter++) { $var = \$wins_$counter; $wins = $wins + $$var;

Re: [PHP] eval problem

2002-07-02 Thread Analysis Solutions
On Tue, Jul 02, 2002 at 11:19:22PM -0400, Analysis Solutions wrote: Oops. Forgot to escape the $: $var = \$wins_$counter; Oops. Forgot my promise to myself to always test things before posting. I had a sinking feeling my initial posting would come back to haunt me, but I JUST

Re: [PHP] eval problem

2002-07-02 Thread Greg Wineman
You da man. Thanks Analysis Solutions [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... On Tue, Jul 02, 2002 at 11:19:22PM -0400, Analysis Solutions wrote: Oops. Forgot to escape the $: $var = \$wins_$counter; Oops. Forgot my promise to myself to

[PHP] eval()

2002-05-20 Thread jtjohnston
I know I'm not doing this right, but .. What I want to do is display the value of $q1 through $q3. How? I can't get eval() to do it, can I? for ($i = 1; $i = 3; $i++) { $x= eval (\$q.$i); echob$x/b\n; echobrinput type=\hidden\ name=\a.$i.\ value=\\\n; } John -- PHP General Mailing List

Re: [PHP] eval()

2002-05-20 Thread Miguel Cruz
On Mon, 20 May 2002, jtjohnston wrote: I know I'm not doing this right, but .. What I want to do is display the value of $q1 through $q3. How? I can't get eval() to do it, can I? for ($i = 1; $i = 3; $i++) { $x= eval (\$q.$i); echob$x/b\n; echobrinput type=\hidden\ name=\a.$i.\

Re: [PHP] eval()

2002-05-20 Thread Bogdan Stancescu
for ($i = 1; $i = 3; $i++) { $x= $q$i; $val=$$x; echob$val/b\n; echobrinput type=\hidden\ name=\a.$i.\ value=\\\n; } jtjohnston wrote: I know I'm not doing this right, but .. What I want to do is display the value of $q1 through $q3. How? I can't get eval() to do it, can I? for ($i = 1; $i

Re: [PHP] eval()

2002-05-20 Thread Bogdan Stancescu
Sorry, please change line 2 with $x=q$i. Bogdan Bogdan Stancescu wrote: for ($i = 1; $i = 3; $i++) { $x= $q$i; $val=$$x; echob$val/b\n; echobrinput type=\hidden\ name=\a.$i.\ value=\\\n; } jtjohnston wrote: I know I'm not doing this right, but .. What I want to do is display the

[PHP] eval on php embedded html

2002-01-24 Thread DigitalKoala
hi folks, i'm having a problem using eval. i have some html code interdispersed with php code (proper statement not just variables) in a database. when i fetch the code and display it using : $reg_adv_html=addslashes($reg_adv_html); eval(\$reg_adv_html = \$reg_adv_html\;);

Re: [PHP] eval on php embedded html

2002-01-24 Thread Atanas Vassilev
So, either: ? if ($radiobutton1 == on) { print selected; } ? Or ? if ($radiobutton1 == on) print selected; ? I found it very convenient for in-html coding to use the following structure: input blabla bla ? echo($radiobutton1 == on ? selected : );? -- PHP General Mailing List

[PHP] eval()

2002-01-20 Thread Kunal Jhunjhunwala
Hey Does anybody know if its wise to use eval() ? I know Vbulletin uses it.. but there is something about it I just cant digest.. it seems to be a very powerfull function which can be very easily exploited... anyone else have any thoughts? Regards, Kunal -- PHP General Mailing List

[PHP] eval on a form

2001-12-09 Thread Paul Roberts
Hi I'm trying to pre-fill a form ( the data is passed via sessions or from another script). i have some check boxes on the form that i would like checked if the variable is present. any ideas Paul Roberts [EMAIL PROTECTED] -- PHP General Mailing List

Re: [PHP] eval on a form

2001-12-09 Thread Diego PĂ©rez
Hi I'm trying to pre-fill a form ( the data is passed via sessions or from another script). i have some check boxes on the form that i would like checked if the variable is present. any ideas Hi Paul: I think that you can use JavaScript or VBScript to check the variable and

[PHP] Eval()??? A variables contents?

2001-11-09 Thread Christopher Raymond
PHP Gurus: I have one for you. I'm sure there is a simple solution, but I'm having difficulty finding it. Let's say I have: $content = ?PHP Query_Database( $category );?; If I use ?PHP echo $content; ?, it doesn't evaluate that content. What am I doing wrong here? Is there an

Re: [PHP] Eval()??? A variables contents?

2001-11-09 Thread Kurt Lieber
On Friday 09 November 2001 11:51 am, Christopher Raymond wrote: Let's say I have: $content = ?PHP Query_Database( $category );?; If I use ?PHP echo $content; ?, it doesn't evaluate that content. What am I doing wrong here? What you're doing doesn't make any sense. If it were to work, it

Re: [PHP] Eval()??? A variables contents?

2001-11-09 Thread Chris Hobbs
I just asked a similar question yesterday. The answer is, conveniently enough, eval(). One trick from the php.net page on the function is to do somehting like this: $content = ?PHP Query_Database( $category );?; echo eval (?$content); Christopher Raymond wrote: PHP Gurus: I have one for

Re: [PHP] Eval()??? A variables contents?

2001-11-09 Thread Christopher Raymond
on 11/9/01 2:01 PM, Kurt Lieber at [EMAIL PROTECTED] wrote: What you're doing doesn't make any sense. If it were to work, it would look like the following: ?PHP ?PHP Query_Database( $category );? ; ?, or something similar. I think what you want to do is: ?php $content =

RE: [PHP] Eval()??? A variables contents?

2001-11-09 Thread Johnson, Kirk
http://www.php.net/manual/en/function.eval.php Kirk -Original Message- From: Christopher Raymond [mailto:[EMAIL PROTECTED]] Sent: Friday, November 09, 2001 1:11 PM To: PHP List Subject: Re: [PHP] Eval()??? A variables contents? on 11/9/01 2:01 PM, Kurt Lieber at [EMAIL

Re: [PHP] Eval error

2001-08-16 Thread Pavel Jartsev
Felipe Coury wrote: Hi, I am a beginner in PHP and I am trying to do the following: I have a form in a page that has 3 fields: email_1, email_2 and email_3. I am trying to send e-mail to those people, if the fields are filled. Relevant part of code: ?php for ($i = 1; $i = 6; $i++) {

[PHP] Eval error

2001-08-15 Thread Felipe Coury
Hi, I am a beginner in PHP and I am trying to do the following: I have a form in a page that has 3 fields: email_1, email_2 and email_3. I am trying to send e-mail to those people, if the fields are filled. Relevant part of code: ?php for ($i = 1; $i = 6; $i++) { $eval = '\$email =

Re: [PHP] Eval error

2001-08-15 Thread Mark Maggelet
lots of things: 1) variables in single-quoted strings aren't evaluated so you don't need to escape the $ in $email 2) php uses . not + for concatenation. 3) try it like this: eval('$email = $email_'.$i.';'); or eval(\$email = \$email_$i;); 4) you can save yourself the trouble by using arrays

[PHP] eval() to string???

2001-01-24 Thread [ rswfire ]
I want to evaluate some PHP code to a string. How can I do this? $php_code = "echo 'hello';" I would like to evaluate the code to "hello" in another string...

AW: [PHP] eval() to string???

2001-01-24 Thread Thomas Weber
try eval("\$php_code;"); -Ursprngliche Nachricht- Von: [ rswfire ] [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 24. Januar 2001 15:36 An: [EMAIL PROTECTED] Betreff: [PHP] eval() to string??? I want to evaluate some PHP code to a string. How can I do this? $php_code = &q

AW: [PHP] eval() to string???

2001-01-24 Thread Thomas Weber
6:20 An: [EMAIL PROTECTED] Betreff: Re: [PHP] eval() to string??? How is this going to help me? I want to evaluate the code in $php_code to *another* string... - Original Message - From: Thomas Weber To: Php-General Sent: Wednesday, January 24, 2001 10:14 AM Subject: AW: [PHP] eval() t

RE: [PHP] eval() to string???

2001-01-24 Thread indrek siitan
Hi, I want to evaluate the code in $php_code to *another* string... you have to do it through output buffering: ob_start(); eval($php_code); $another_string=ob_get_contents(); ob_end_clean(); Rgds, Tfr --== [EMAIL PROTECTED] == http://tfr.cafe.ee/ == +372-50-17621 ==-- --

Re: AW: [PHP] eval() to string???

2001-01-24 Thread Steve Edberg
-Ursprngliche Nachricht- Von: Robert S. White [mailto:[EMAIL PROTECTED]] Gesendet: Mittwoch, 24. Januar 2001 16:20 An: [EMAIL PROTECTED] Betreff: Re: [PHP] eval() to string??? How is this going to help me? I want to evaluate the code in $php_code to *another* string... From

[PHP] eval() function

2001-01-14 Thread Adam Powell
Hi, in my application I am making a lot of use of the eval() function, however I was wondering if this is going to cause any extra load. Does it do anything like load in the PHP engine again or anything? We just added it in and the load on our web servers went up... so I was wondering if I

Re: [PHP] eval() function

2001-01-14 Thread Rasmus Lerdorf
Yes, eval() is expensive. On Sun, 14 Jan 2001, Adam Powell wrote: Hi, in my application I am making a lot of use of the eval() function, however I was wondering if this is going to cause any extra load. Does it do anything like load in the PHP engine again or anything? We just added it