html - PHP Function named after the Value of a Variable -


i have php function need create executes php or html code stored in variable. that's 1 problem. problem fact function created multiple times , need unique name i've named after $title i'm not sure if create function value of $title or if create function called $title or if won't work. code:

$title = $_post['sogo_aso_name']; $output = $_post['sogo_aso_output']; 

some code here...

function $title ($output) { //some code here execute $output... } 

so... that's problem. i'm not sure execute $output cleanly can shown on page. , don't know if function named after value of $title

thanks help!

ethan brouwer

you can use call_user_func this:

call_user_func($title, $output); 

but it's strange change name of 1 function.


Comments

Popular posts from this blog

JQuery Autocomplete without using label, value, id -

c++ - Accessing inactive union member and undefined behavior? -

JAVA - what is the difference between void and boolean methods? -