[PHP] preg_replace 공백제거 $data = "How are doing?"; $out = preg_replace("/\s+/", " ", $data); echo $out; //출력 : Howaredoing? Helloworld!/PHP 2013. 3. 12. 15:51