From what I understand you have a loop that displays up to 500 pages. If the page parent = 18219 than you want to query the tags for that page. As far as I know, by default WP does not allow you to tag Pages, only Posts. But let’s pretend you have a plugin that allows you to do that… Inside your loop you can check to see if the page has a parent equal to the ID you’re looking for.
//Check if this page has a parent equal to $resparent
if($post->post_parent == $resparent){
$terms = get_the_terms($post->ID, 'post_tag');
foreach ( $terms as $term ) {
if (strlen($term->slug) >1){
$terms_array[] = $term->slug.",".$term->name ;
}
}
}