私は次のような文字列を持っています
<p>
<style type="text/css">
P { margin-bottom: 0.21cm; direction: ltr; color: rgb(0, 0, 0); }P.western { font-family: "Times New Roman",serif; font-size: 12pt; }P.cjk { font-family: "Arial Unicode MS",sans-serif; font-size: 12pt; }P.ctl { font-family: "Tahoma"; font-size: 12pt; } </style>
</p>
<p align="CENTER" class="western" style="margin-bottom: 0cm">
<font size="5" style="font-size: 20pt"><u><b> TEXT I WANT TO GET </b></u></font></p>
html、cssを削除してテキストのみを取得するにはどうすればよいですか?
私はを認識しておりstrip_tags()
、 で関数を書くことができますがpreg_replace
、php の実用的な解決策はありますか? ありがとう。