$html .= $closing_tag;
// if previous iteration was diferent class close p
- } elseif ($i != 0 && empty($url)) { // need to check if url is empty cause if not then the classes will go in the a tag
+ } elseif ($i != 0 && empty($url) && empty($title)) { // need to check if url is empty cause if not then the classes will go in the a tag
if (empty($this->str_val_or_empty($data[$i - 1], 'url')) && array_map('trim', explode(",", $this->str_val_or_empty($data[$i - 1], 'class'))) != $class) {
[$closing_tag, $is_p_closed] = $this->open_or_close_p($is_p_closed, $class, CLOSE);
$html .= $closing_tag;