|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
how to use eval();
well.. i know about the eval(); function..
but how do i use it ?? ?? |
|
#2
|
|||
|
|||
|
Well I'm not sure what language you are referring to, but the implementation will be relatively the same in any language that supports it. The following example would be a use in ASP:
Code:
strCodeToExec = "Response.Write(" & Chr(34) & "Hey" & Chr(34) & ")"
Response.Write(Eval(strCodeToExec))
|
|
#3
|
|||
|
|||
|
Firstly, its the php eval function, say if you have a var like this
$var = "<?php echo '$test' ?>"; now if you printed this out, you would get something like this <?php echo '$test' ?> but if you eval, that would actually parse that code, i think, correct me if im wrong |
|
#4
|
|||
|
|||
|
need help w/ eval
also trying to use eval() for php but am having difficulties figuring out its syntax
in CF i can do this: <cfset x='abc'> <cfset y='2'> <cfset z='3'> <cfoutput> #x# is the same as #evaluate(x)# and #abc_2# is the same as #evaluate(x & '_' & '2')# <!--- The value of 'abc_2' is output the same regardless of method used ---> </cfoutput> How is the evaluate(x & '_' & '2') expression created in PHP ? (x is a variable, _ and 2 are known strings) Thanks, - Joe |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Programming Tools > how to use eval(); |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|