0
을 내가 가지고 다음 HTML : 내가 배열에 ABC의 콘텐츠를 저장하기 위해 다음과 같은 쿼리를 사용하고랩 HTML 태그 PHP 텍스트() // 사용하는 경우 : DOMXPath
<div id="ABC">
<i>Lorem Ipsum</i> is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
<br>
It has survived not only <b>five centuries</b>, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with <i>desktop publishing software</i> like Aldus PageMaker including versions of Lorem Ipsum.
</div>
:
foreach ($xpath->query('//div[@id="ABC"]/text() | //div[@id="ABC"]/i | //div[@id="ABC"]/b') as $text) {
$data['content'][] = $text->nodeValue;
}
그리고이 같은 출력 뭔가 :이 같은 출력을 원하는 경우
[content] => Array
(
[0] => Lorem Ipsum
[1] => is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
[2] => It has survived not only
[3] => five centuries
[4] => , but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with
[5] => desktop publishing software
[6] => like Aldus PageMaker including versions of Lorem Ipsum.
)
이 가능합니까? 당신이 할 수있는 일
[content] => Array
(
[0] => Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
[1] => It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
)
당신은 @ james-holderness의 남자 야. 그래서 내가 필요한만큼 똑바로 간단 해. :) –