Programming Tools
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingProgramming Tools

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 24th, 2002, 05:13 PM
xavier xavier is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 2 xavier User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
how to use eval();

well.. i know about the eval(); function..

but how do i use it ??

??

Reply With Quote
  #2  
Old August 24th, 2002, 05:20 PM
wes wes is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 24 wes User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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))

Reply With Quote
  #3  
Old August 25th, 2002, 07:26 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
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

Reply With Quote
  #4  
Old July 12th, 2004, 12:41 AM
jiggy1com jiggy1com is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 1 jiggy1com User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingProgramming Tools > how to use eval();


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap