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

본문 바로가기
사이트 내 전체검색

php

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

작성자 웹지기
작성일 18-09-21 12:47 | 조회 8,582 | 댓글 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

댓글목록 0

등록된 댓글이 없습니다.

php 목록

Total 82
게시물 검색

회원로그인

접속자집계

오늘
27,619
어제
17,832
최대
61,067
전체
17,966,731

그누보드5
Copyright © www.funyphp.com. All rights reserved.