I have a bit of a problem to succesfully create variable combining string and other variable. Problem is when i echo one variable i get a number (1..4) and i need to add that number to string "odpoved" so the combined variable looks like this "odpoved1". Im not sure if i have problem with creating that variable or calling it´s echo result from database. Here is my code
<?php $spr=$result['odpoved']; $spravne=['odpoved'.$spr]; echo $spravne;?>
when i call variable $spravne result is just "Array" but i need it to show result from database under column "odpoved1""odpoved2""odpoved3""odpoved4" Can somebody help me? Thanks