Код: Выделить всё
$html= file_get_html('https://www.abc.co.uk' . $link);
Код: Выделить всё
Код: Выделить всё
$event=[];
if ($html->find('meta[property="phone_number"]',0)) { $event["phone_number"]=$html->find('meta[property="phone_number"]',0)->getAttribute('content'); }
Мне хотелось бы перейти к однострочному варианту, и я попробовал следующий код:
Код: Выделить всё
$event["phone_number"]=$html->find('meta[property="phone_number"]',0)->getAttribute('content');
Подробнее здесь: https://stackoverflow.com/questions/792 ... rty-in-php
Мобильная версия