I want to dynamically run a php function using this line:
do_lightbox('image1.jpg', 'picture 1')
I parsed the line as follows:
$exe = "do_lightbox";
$pars = "'image1.jpg', 'picture 1'";
and tried using the following code:
$rc = call_user_func($exe, $pars);
Unfortunately this gives me an error - I also tried splitting $ pars, for example
$pars = explode(',', $pars);
but it didn’t help ..
any ideas? thank
source
share