I have a function which receives unlimited number of arguments. (I am using func_get_args for that)
Example: function generate($one, $two, $three, ...)
Each one of the parameters represents a column in another array (let's call it $array).
I want to receive the value of the another array on $array[$one][$two][$three]
That means that the number of "[]" is unlimited
I have tried to generate a var in var for this.
<?php
$ron = array("sir" => "yes");
$name = 'ron["sir"]';
echo var_dump(${$name});
?>
My result:
Notice: Undefined variable: ron["sir"] in C:\Users\ronr\Desktop\xampp\htdocs\lol.php on line 5 NULL