trim - 앞뒤 공백 제거 함수 및 preg_replace 정규표현식
페이지 정보
본문
(PHP 4, PHP 5, PHP 7)
trim — Strip whitespace (or other characters) from the beginning and end of a string
ltrim() - 문자열 시작에서 공백(이나 다른 문자)를 제거
rtrim() - 문자열 마지막의 공백(이나 다른 문자)을 제거
$email = preg_replace("/\s+/", "", $email);
trim — Strip whitespace (or other characters) from the beginning and end of a string
ltrim() - 문자열 시작에서 공백(이나 다른 문자)를 제거
rtrim() - 문자열 마지막의 공백(이나 다른 문자)을 제거
$email = preg_replace("/\s+/", "", $email);
- 이전글rand(), mt_rand 정수난수생성 20.09.18
- 다음글cafe24에서 php 에러 출력 20.09.18
댓글목록
등록된 댓글이 없습니다.