1
我需要通過比較兩個字符串來獲取不匹配的字符或單詞(即子字符串)。比較兩個字符串並返回不匹配的子字符串
對於防爆:
$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';
感謝您的回答!但我覺得這是不對的做法,其他答案給出了一些解決方案。 –