Good day. Not good at regular expressions. Help finish.
This code takes the text from the site, namely the page - http://best-muzon.ru/lastnews/ It is necessary to cut out only the names of the songs, but with my regular season, it displays only part of the songs.
There is a code -
$skrap = parser ($host,$path,$start,$end,$include); if ($skrap) { // Заменить теги переноса строки на простые переносы строки $grab=str_replace("<br>","\n",$grab); // Получить регулярным выражением тексты цитат preg_match_all("/<div id=\"shrt\">([^>]*>){12}([^<]*)/",$skrap,$matches); // В массиве содержатся все найденные строки for ($i=0; $i<count($matches[2]); $i++) { echo '<a href="/mp3/'.nl2br($matches[2][$i]).'">'.nl2br($matches[2][$i]).'</a>'; echo '<br>'; } }