Hi there. I'm trying to wrap my brain around something that is probably really simple - once you know how.
I want to print the name of each park, only once, along with a list of its features.
I have the following SQL query...
$query = 'SELECT id, name, feat_name FROM allparks LEFT JOIN prkcombine ON allparks.id = prkcombine.pk_id LEFT JOIN prkfeature ON prkcombine.pkfeat_id = prkfeature.pkfeat_id WHERE allparks.id =$id';
This yields the following result:
id name feat_name 2 Municiple Park Cricket pitch 2 Municiple Park Cycle/walking track 2 Municiple Park Picnic benches
How do I using this SQL result to print something like this:
<h3>Municiple Park</h3> <ul> <li>Cricket pitch</li> <li>Cycle/walking track</li> <li>Picnic benches</li> </ul>