I have ran an sql statement and returned the array.
I am now trying to iterate through the array and create individual variables on the fly e.g week1, week2, week3 for as many records as there are in the array.
Does anyone have any ideas on how I can achieve this??
At the moment the code looks like this however I'm not having any success:
$week = "week";
$i = "1";
while ($row_FormFields = mysql_fetch_array($FormFields)){
$week.${$i} = $row_FormFields['week'];
$price = $row_FormFields['price'];
$availability.$i = $row_FormFields['availability'];
$i ++;
}