public static function extract_p($p) { $p = trim($p); $data = array(); $res = explode(" ", $p); $title = Grabber::getTagContents($p, '<b>', true); foreach ($title as &$elem) { $elem = str_replace(":", "", $elem); } $i = 0; foreach ($res as $elem2) { if ($i == 0) { $i++; continue; } $var = explode('<br>', $elem2); $data[$title[$i - 1]] = trim(strip_tags($var[0])); $i++; } return $data; }