data is sent to the server, which, depending on the value of one of the array elements, needs to be transferred to different functions. In order not to fence a switch / case I want to call the function like this:
$data = array( 'table' => 1, 'sumArr' = array(.....); ); myFoo.$data['table']($data); function myFoo1($data){ } function myFoo2($data){ } ..... and what if the code is written in OOP? This is how it works:
$data = $this->_myfooOne($postdata); But so no longer:
$varfoo = $this->"_myfoo".$num; $data = $varfoo($postdata); writes
syntax error unexpected "_myfoo"
or so it will not work and the value of the table element will need to be passed as an argument to one large function already there to work?
all the same, I would like to have several independent functions to which, if anything, I can address directly ..