これは私の文字列です:
$a = "RSS
here:
Your result: 3 points form 50 example.";
この文字列から「RSShere:」を削除するにはどうすればよいですか?
私の試み:
$result = str_replace("RSS
here:
Your result: 3 points form 50 example.", " " ,$a);
echo $result;
これは私の文字列です:
$a = "RSS
here:
Your result: 3 points form 50 example.";
この文字列から「RSShere:」を削除するにはどうすればよいですか?
私の試み:
$result = str_replace("RSS
here:
Your result: 3 points form 50 example.", " " ,$a);
echo $result;
たとえば、改行に使用\r\n
します。carriage return + line feed
$a = "RSS
here:
Your result: 3 points form 50 example.";
$result = str_replace("RSS\r\nhere:", "" ,$a);
echo $result;
結果:
Your result: 3 points form 50 example.
ここのRSSに特殊文字がない場合:これでうまくいくはずです
$result = str_replace("RSS here:", "", $a);