PHP には、変更したい文字を含む文字列があります。たとえば、これは文字列の一部です。
$string = '***ROOMS*** The rooms and bathrooms were fully renovated in 2006. They are reported to be quite small but are very clean, well maintained and with modern bathrooms. Rooms are tastefully designed with warm colours and pine wooden furniture. ***RESTAURANTS & BARS*** There is no restaurant in the hotel however there the comfortable ground floor lounge is open all day where ';
この段落を次のように印刷したいと思います。
<b>ROOMS</b><br>
The rooms and bathrooms were fully renovated in 2006. They are reported to be quite small but are very clean, well maintained and with modern bathrooms. Rooms are tastefully designed with warm colours and pine wooden furniture.<br>
<b>RESTAURANTS & BARS</b><br>
There is no restaurant in the hotel however there the comfortable ground floor lounge is open all day where
これは、 と の間の文字列が次のよう***
に***
なることを意味します。<br><b> string </b><br>
str_replace またはパターンを使用してそれを行う方法はありますか?
ありがとう