본문 바로가기

웹개발/php

[php]대소문자 변환(strtolower,strtoupper)

반응형

대소문자 변환(strtolower,strtoupper)


strtolower($str) - 대문자를 소문자로 변환하여 반환한다.

strtoupper($str) - 소문자를 대문대로 변환하여 반환한다.



ex) 소스

<?php

        $text="aBcD";

        echo "대문자 -> 소문자 : ".strtolower($text)."<br />";

        echo "소문자 -> 대문자 : ".strtoupper($text);

?>


ex)결과



반응형

'웹개발 > php' 카테고리의 다른 글