You can just use `foreach ( $posts as $post )`.