'; //print_r($items); //echo ''; $i = 0 ; if(count($items) > 0) { foreach($items as $child) { $event[$i] = $child; $events = getAllChild("ta_location","WHERE id=".$child[location].""); //print_r($events); $lineup = array(); foreach($events as $artist) { //echo 'hiiii'; $lineup = array( 'id' => $artist['id'], 'e_id' => $child['id'], 'name' => stripslashes($artist['name']), 'subname' => stripslashes($artist['sub_name']), 'subcategory_id' => $artist['subcategory_id'], 'category_id' => $artist['category_id'], 'gps' => $artist['gps'] ); } //print_r($lineup); $event[$i]['locationni'] = $lineup; //print_r($event); $i++; } } // preparing a list of dates/times when this artist is having gigs. To be put in a