How to get text in array between all <span> tag from HTML?
问题 I want to fetch text in array between all <span> </span> tag from HTML, I have tried with this code but it returns only one occurrence : preg_match('/<span>(.+?)<\/span>/is', $row['tbl_highlighted_icon_content'], $matches); echo $matches[1]; My HTML: <span>The wish to</span> be unfairly treated is a compromise attempt that would COMBINE attack <span>and innocen</span>ce. Who can combine the wholly incompatible, and make a unity of what can NEVER j<span>oin? Walk </span>you the gentle way, My