logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > PHP
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 08-16-2012, 10:01 PM   #1
gavimobile
gavimobile's Avatar
 
Join Date: Mar 2007
Posts: 187
Default 'eval' and with alot of trouble

hey folks,

its been some time since my last post!

im using php 5.3.x and i know its not recommended to use the eval() function however i found a need where i must use it.

how can i use a foreach loop inside of the eval function.

PHP Code:
eval("
    foreach (\$var as \$key => \$value) { 
        ...
    }
"
); 
i believe i need to escape the arrow but i dont know how

thanks in advance
__________________
there are many technicians today, but theres only 1 motek! motekpc.com

Last edited by gavimobile; 08-16-2012 at 10:02 PM.. Reason: mistake
gavimobile is offline   Reply With Quote
Old 08-19-2012, 10:54 AM   #2
gavimobile
gavimobile's Avatar
 
Join Date: Mar 2007
Posts: 187
Default problem solved

i solved this issue,
it was a silly mistake on my side! there wasnt any solution. just double checked my work :-p
__________________
there are many technicians today, but theres only 1 motek! motekpc.com
gavimobile is offline   Reply With Quote
Reply


Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:38 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com