一致した 2 つの文字列が必要で、一致した文字列の後に < p > タグを追加します。
$string1="<p>he adventures <p>
<p>of < span >adolescence< /span > had taught Piet < span >Barol< /span > that he</p>";
$matching_with_string="he adventures
of adolescence had
taught Piet Barol
that he";
文字列 1 の出力が必要で、HTML タグのすべてのインクルードで同じままになります。