$string = "WORD is the first HEJOU is the Second BOOM is the Third";
$sring = str_replce('???', '???<br>', $string);
echo $string; // <br>WORD is the first <br>HEJOU is the Second <br>BOOM is the Third
那麼這個例子說明了一切。我想選擇大寫字母的所有單詞(而不是以大寫字母開頭的單詞)並替換爲前面的內容。有任何想法嗎?如何從字符串中查找(並替換)大寫字母的單詞?
'#'字符的用法是什麼? – user823959
這只是一個分隔符。 '#'可以被另一個字符替換。/常見。我似乎總是使用# – sberry
像RiaD使用〜代替。 – sberry