So when I use {$var} there is no need to break my ""'s? I notice this method a lot, like with echos. thanks for the help you two, It still seems to be giving me errors though. "Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in" So this means my array is not being dumped proper? I will do a pre print to check but looks like I will not call my 'day' with my function cause it still requires me to recode for each day.
Is there a better way to be repeating this info though? I still feel like I should be able to query once then be able to sort and loop the data without repeating the code for each day. now that I have to format the time ect it looks even more repetitive.
I repeat this code for each day of the week.
PHP Code:
echo "<p class='headline'>Sunday</p>";
$schedule = get_schedule();
while ($post = mysql_fetch_assoc($schedule)) {
$starttime = strftime("%I:%M %p",strtotime($post["starttime"]));
$endtime = strftime("%I:%M %p",strtotime($post["endtime"]));
$time = $starttime . " - " . $endtime;
if ($post["day"]=="Sunday")
echo "<div class='title'> {$time} | <strong>{$post["name"]}</strong> </div>
<div class='tag'>with {$post["dj"]}: {$post["discription"]} </div>";
}