Jump to content

[SOLVED] execute functions in a variable


ldsmike88

Recommended Posts

I have a variable that contains some functions I want executed. For example:

var mystring = "myFunction('hello');mySecondFunction('me', 'again');";

 

I tried using eval(mystring) but that didn't work. How would I go about executing those functions? Thanks!

Link to comment
https://forums.phpfreaks.com/topic/43093-solved-execute-functions-in-a-variable/
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.