didgydont Posted June 24, 2009 Share Posted June 24, 2009 hi all im trying to make a time table with 4 fields im trying to make the result like below so i dont have to type a lot of code $result = mysql_query("SELECT * FROM CGSLappointments WHERE appdate='$currentdate'"); while($row = mysql_fetch_array($result)) { $appdate = $row['appdate']; $apptime = $row['apptime']; $rep = $row['rep']; $customer = $row['customer']; $$rep$apptime = "$customer"; <------ this is what doesnt work } im trying to make in the time table like this <tr><td>12:00pm</td><td>$john1200pm</td><td>$Sue1200pm</td></tr> any ideas ? Link to comment https://forums.phpfreaks.com/topic/163472-trying-to-make-time-table/ Share on other sites More sharing options...
didgydont Posted June 24, 2009 Author Share Posted June 24, 2009 this worked $result = mysql_query("SELECT * FROM CGSLappointments WHERE appdate='$currentdate'"); while($row = mysql_fetch_array($result)) { $appdate = $row['appdate']; $apptime = $row['apptime']; $rep = $row['rep']; $customer = $row['customer']; $job = "$rep$apptime"; $$job = "$customer"; } Link to comment https://forums.phpfreaks.com/topic/163472-trying-to-make-time-table/#findComment-862533 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.