How to loop for php available name like this ?
<?PHP
for ($i=1;$i>10:$i++)
{
$group_$i_temp = ($i+$i);
}
echo $group_5_temp;
?>
It's will echo
10
how to do that ?
How to loop for php available name like this ?
<?PHP
for ($i=1;$i>10:$i++)
{
$group_$i_temp = ($i+$i);
}
echo $group_5_temp;
?>
It's will echo
10
how to do that ?
for ($i=1;$i<=10;$i++)
{
$name = "group_{$i}_temp";
$$name = ($i+$i);
}
echo $group_5_temp;