php 태그와 태그 속의 값 분리하여 처리하기 예제 - preg_match_all 함수 The above example will output: example: , this is a test example: , this is a test So, $out[0] contains array of strings that matched full pattern, and $out[1] contains array of strings enclosed by tags. http://kr.php.net/manual/en/function.preg-match-all.php