大寫字符我下面,它似乎試過沒有工作爲PHP,如何小寫或字符串
if ($word[$index] >= 'a' && $word[$index] <= 'z') {
$word[$index] = $word[$index] - 'a' + 'A';
} else if ($word[$index] >= 'A' && $word[$index] <= 'Z') {
$word[$index] = $word[$index] - 'A' + 'a';
}
這裏有什麼問題?達到預期結果的最佳方法是什麼?
讓我澄清一下這個問題:你想一些特別的角色,成爲小寫,如果是大寫,反之亦然? – raina77ow
@ raina77ow我從這個問題得到同樣的印象。 – wazy
什麼現在不適合你? – karthikr