[ php ] 문자, 문자열 대소문자 변환 함수 대문자로, 소문자로, 첫단어, 문장의첫글자 strtoupper(), strtolower(), ucwords(), ucfirst() > php

본문 바로가기

사이트 내 전체검색

php

[ php ] 문자, 문자열 대소문자 변환 함수 대문자로, 소문자로, 첫단어, 문장의첫글자 strtoupper(), strto…

작성일 18-09-21 12:47

페이지 정보

작성자 웹지기 조회 5,479회 댓글 0건

본문

소문자로 변환

[code]

strtolower()

$a = "AbcdEfg";

$a = strtolower($a);

출력 : abcdefg

[/code]

 

대문자를 소문자로

[code]

strtoupper()

$a = "AbcdEfg";

$a = strtoupper($a);

출력 : ABCDEFG

[/code]

 

각 단어의 첫글자를 대문자로

[code]

ucwords()

$a = "hello world";

$a = ucwords($a);

출력 : Hello World

[/code]

 

전체 문장의 첫글자를 대문자로

[code]

ucfirst()

$a = "hello world";

$a = ucfirst($a);

출력 : Hello world

[/code]


추천0

비추천 0

댓글목록

등록된 댓글이 없습니다.

전체 82건 4 페이지

이미지 목록

게시물 검색
Copyright © 즐거운 코딩 생활 ( funyphp ). All rights reserved.
PC 버전으로 보기