0
나는 다음과 같은 코드를 분석하려고 해요 : 내가 필요한 기본적구문 분석 HTML 요소는
<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable" style="table-layout: fixed;max-width:100% !important;width: 100% !important;min-width: 100% !important;">
입니다 : 간단한 explode(" ", $str);
와 함께이 일을 할 때 내가 갖는 그러나
Array
(
[0] => <table
[1] => border="0"
[2] => cellpadding="0"
[3] => cellspacing="0"
[4] => height="100%"
[5] => width="100%"
[6] => id="bodyTable"
[7] => style="table-layout: fixed;max-width:100% !important;width: 100% !important;min-width: 100% !important;
)
"스타일"도 나뉘어져 있습니다.이 구문을 분석하고이를 반복하는 간단한 방법이 있습니까?
이'style' 속성 내부에서 공백을 제거합니다. – coderodour
빠른 해킹 솔루션을 찾고 있다면 정규식을 사용해 볼 수도 있습니다. – dan08
http://php.net/manual/en/function.explode.php – Aaron