I want to be able to initialize variable in PHP like in Java
$x=1;
while($x<10)
{
$Num$x=$x;
$x++;
}
And yes it does not work, my purpose is to make a function to initialize $result=mysqli_query($X,$y)
Let's say i know there is table ID and Name, and want to initialize as $ID1,$ID2,$Name1,$Name2
and so on according to the table size, i know you can use while($row=mysqli_fetch_array($result))
loop but i don't see this is a way to do it with $x cannot work as counter.