1 개요[ | ]
- PHP ucwords()
- 문자열에서 각 단어의 첫번째 문자를 대문자로 만든다.
PHP
Copy
echo ucwords('hello, world!');
# Hello, World!
echo ucwords('hello world!');
# Hello World!
PHP
Copy
echo ucwords('HELLO WORLD!');
# HELLO WORLD!
echo ucwords(strtolower('HELLO WORLD!'));
# Hello World!
PHP
Copy
echo ucwords('hello|world!');
# Hello|world!
echo ucwords('hello|world!', "|");
# Hello|World!
2 같이 보기[ | ]
- PHP strtoupper() - 문자열을 대문자로 만든다.
- PHP strtolower() - 문자열을 소문자로 만든다.
- PHP ucfirst() - 문자열의 첫번째 문자를 대문자로 만든다.
- PHP mb_convert_case() - 문자열을 모드에 따라 대소문자를 변경한다.
- PHP studly_case()
- 함수 ucwords()
편집자 Jmnote Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.
- 분류 댓글:
- PHP (8)
PHP 파일 다운로드 구현 2 (한글 파일명 지원) ― …PHP에서 오라클 DB 사용 ― YoWuPHP 파일 업로드 구현 ― 일리단사오육칠PHP 파일 업로드 구현 ― JmnotePHP 파일 다운로드 구현 2 (한글 파일명 지원) ― AnmkstLib my.php ― 신정섭Lib my.php ― Jmnote로또번호 생성 ―Pinkcrimson