// $connections
Array
(
[0] => 31
[1] => 35
)
$query = new WP_Query( array(
'post_parent__in' => $connections,
'order' => 'ASC',
'posts_per_page' => -1,
));
while ($query->have_posts()) : $query->the_post();
echo get_the_title();
endwhile;
wp_reset_postdata();