How to put PHP string in a function name?
for ($i=1;$i<10;$i++) {
function my_function_$i() {
//Parse error: syntax error, unexpected T_VARIABLE, expecting '('
include($i.'.php');
}
}
UPDATE:
OK. closed this question, I shall study for more.
my_function_1()involve less copy-pasting than writinginclude('1.php'), ormy_function(1)?