Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
「マニッシュ」という単語のいくつかのインスタンスを含む段落があります。残りの行を変更せずに、「manish」という単語を含む行を削除したいと思います。
最も安くて簡単な方法は、単純に次のことを行うことです。
$text = str_replace('yourword','',$text);
さらに単語がある場合は、最初の引数(http://www.php.net/str_replace)で配列を渡すことができます。
str_replace ('manish', '', $string);
$stringあなたの段落はどこにありますか。
$string