I have an multiple variable like this and i want to combine two variable in foreach loop:
$foo = array(4, 9, 2);
$variables_4 = array("c");
$variables_9 = array("b");
$variables_2 = array("a");
foreach($foo as $a=>$b) {
foreach($variables_{$b} as $k=>$v) {
echo $v;
}
}
After i run above code it display error "Message: Undefined variable: variables_"
Is anyone know how to solve this problem?