[php] 공백 제거하기
$string = "   Hello, world!   ";
$trimmedString = trim($string);
echo $trimmedString; // "Hello, world!"

위의 예제에서 trim() 함수는 $string의 시작과 끝 부분의 공백을 제거하여 “Hello, world!”로 변환합니다.