You almost had it too 😉
$varprefix = 'matrix';
for ($i=0 ; $i<3 ; $i++) {
${$varprefix$i} = $number_array[$i] ;
}
echo "<br>" ;
print($matrix0);
echo "<br>" ;
print($matrix1);
echo "<br>" ;
print($matrix2);
echo "<br>" ;
$matrix isnt a variable he was using.. only the prefix he wanted....
may work as ${matrix$i} also... I just corrected it the simlpest way first