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

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

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

php - Get uncommon values from two or more arrays -