我有这样的字符串:我的代码是:
$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
and Response id =:45
。
当我打印块引用时,我得到了上面的文本。现在我想获取我的票证 ID 和响应 ID,但不知道如何?