I have a similar problem with this topic Appending a value of a variable to a variable name?
but the answer not solve my problem, i have variable,$item->ans_cont1 ..... to $item->ans_cont34 tried
for($i=1;$i<35;$i++) {
$inputval = 'item->ans_cont'.$i;
echo $$inputval; //output is empty
echo ${'item->ans_cont'.$i}; //output is empty
}
but not work,is it "->" arrow problem?how to fix it?
Thanks!