У меня есть строка, как это: Мой код:Получить определенную часть из строки
$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, я получаю текст выше. Теперь я хочу получить идентификатор идентификатора и идентификатор ответа, но не знаю, как это сделать?
взглянут на регулярные выражения, которые должны помочь вам ... – kratenko