How to assign variables in php with for loop?

assign variables in php with for loop
for($i = 0; $i <= 7; $i++) {
$name
= "variable{$i}";
$$name
= "foo";
}
or
for($i = 0; $i <= 7; $i++) {
$
{"variable$i"} = "foo";
}
or
${"jassi"} .= $_POST['skip'.$daynum];

Leave a Reply

Your email address will not be published. Required fields are marked *