에서 특정 부분을 가져 오기 : 내 코드는 다음과 같습니다이 같은 문자열이 문자열
$html = new DOMDocument();
$html->loadHTML($message);
$items = $html->getElementsByTagName('div');
foreach($items as $item) {
$headline = array();
if($item->childNodes->length) {
foreach($item->childNodes as $i) {
$headline[$i->nodeName] = $i->nodeValue;
}
}
$headlines[] = $headline;
}
foreach ($headlines as $key => $value) {
$quote = $value['blockquote'];
}.
print_r($quote);
output ="this is your message.
Your Ticket ID = :68
Response ID = :45check that if its not contains any error."
내가 Ticket ID =:68
및 Response id =:45
을 싶어.
내가 blockquote를 인쇄 할 때 위의 text.now를 얻을 때 티켓 ID와 응답 ID를 얻고 싶지만 어떻게 해야할지 모르겠다.
, 즉 당신이 도움이 정규 표현식을 살펴 ... – kratenko