Programming/PHP / / 2022. 1. 12. 18:30

[정규식]내용에 html tag가 있는지 확인

728x90

Array
(
    [0] => Array
        (
            [0] => <div style="margin-top: 10px;"><span style="color: #f00;">TEST</span></div>
            [tag] => div
            [1] => div
            [2] =>  style="margin-top: 10px;"
            [3] => style="margin-top: 10px;"
            [4] => <span style="color: #f00;">TEST</span></div>
            [5] => <span style="color: #f00;">TEST</span>
        )
)

코드를 실행하면 결과는 위처럼 나옵니다.

반응형