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.
$string=apple $add=£ $new=app£le
文字列に文字を挿入する際に問題に直面しています。
私があなたなら、文字列を目的の位置で 2 つに分割し、新しい文字を追加して連結し直します。
詳細を説明しますが、意図した分割ルールが何であるかはわかりません。
$string='apple'; $add='£'; $new=substr_replace($string,$add,3,0); echo $new;