foreach ($cats as $cat) {
$cat_alt = explode('|||alt_name=', $cat['options'])[1];
$cat_alt = explode('|||', $cat_alt)[0];
$loc = $this->home . $table . $cat_alt . '/';
$xml .= $this->get_xml($loc, $lastmod);
foreach ($postsCat[$cat['id']] as $post) {
$loc = $this->home . $table . $cat_alt . '/' . $post . '/';
$xml .= $this->get_xml($loc, $lastmod);
}
}
<a class='links'>