*** Your entire set of code is commented out. Fix that first and play with it. /* begins a comment, that doesn't end until a */ /* $total_count++; Should be // $total_count++; Or /* $total_count++; */ The same goes for $display_count++; later in your code. *** Also - $sched[] = array( 'teama' => $item[teama], [] is for adding items to an array, just so you're aware. You're using the foreach and that chunk of code in a very peculiar way, but I'm going to hold off on wrapping my head around it until you fix these bits. Cheers, - Martin Norland, Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php