abitshort Posted December 13, 2009 Share Posted December 13, 2009 $result = query_read("SELECT * FROM schedule WHERE live = 1 ORDER BY DESC"); while($r = fetch_array($result)){ $lala .= "<div>$r[instructor]</div> <div><b>$r[class]</b></div> <div><i>$r[level]</i></div> <div>$r[time] on $r[day]</div>"; } it turns out to be like this: Instructor A Class A Level A Time A --- Day A and Instructor A Class A Level A Time B --- Day B How do i turn it to something like this: Instructor A Class A Level A Time A --- Day A and Time B --- Day B Quote Link to comment https://forums.phpfreaks.com/topic/184949-mplae-question/ Share on other sites More sharing options...
fenway Posted December 14, 2009 Share Posted December 14, 2009 You build your own structure in one pass, then output it in a second pass. Quote Link to comment https://forums.phpfreaks.com/topic/184949-mplae-question/#findComment-977301 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.