false));
foreach ($cats as $cat) {
$posts_by_slug = array(
'category_name' => $cat->slug,
'exclude' => '', // enter the ID or comma-separated list of page IDs to exclude
'numberposts' => '-1' // number of posts to show, default value is 5
);
$posts_array = get_posts($posts_by_slug); ?>