Jump to content

[SOLVED] eval() - How do one use it?


jonem

Recommended Posts

Hi,

 

I have problem with the eval() function and could use som help.

 

I wish to have functions in an actual .php file but then I want to call this function from either code stored in a variable or in MySQL (I guess its about the same?)

 

I have tried with this but cant get it to work.

----

$vpage='fAVINPicture(\'pics/\', \'bild2.jpg\', \'This is a picure of a giraff\', \'\', \'\', $WapVersion);';

 

echo $vtest = eval($vpage);

----

$vpage is where I intend to store the code I want executed and then I try to get it executed below.

 

the function fAVINPicture() creates HTML code to show a picture depending on the variables sent to it.

 

Please help! :-)

 

Best regards -Jon

Link to comment
https://forums.phpfreaks.com/topic/141751-solved-eval-how-do-one-use-it/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.