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.
文字列の最初の文字だけでなく、5 番目の文字も大文字にする必要があります。
文字列「RoadAtlanta」を正しく大文字にする方法は?
インデックスで文字を参照できます。
$string[4] = strtoupper($string[4]);
この特定のケースの 4 は、5 番目の文字を指します。文字列の文字は配列として 0 からインデックス付けされるため、特定の位置の文字を直接参照できます。