1
2つの文字列を比較することで、一致しない文字または単語(つまり部分文字列)を取得する必要があります。例については2つの文字列を比較し、一致しないサブ文字列を返す
:
$str1 = 'one {text} three'; // {text} is a keyword to find the position where my substring output is located
$str2 = 'one two three';
//I need to return following output
$output = 'two';
感謝を出力!しかし、私はこれが正しいアプローチではないと感じ、他の答えはいくつかの解決策を提供します。 –