如何使用php简单的dom解析器获取css选择器的内容?

Image Link

here content in blue from image i need to parse i.e £29 - £117 am using this to get content

$price=$con->find('div.event-availability p',0)->innertext;
echo"price";

as CSS selector (::before) is present here unable to parse this content. need output as '£29 - £117'

how to get this output? any other method?

The ::before won't even be detected by the parser as that gets applied after the page is rendered and isn't part of the DOM itself, so that isn't the problem.

The problem instead is that you're not directly targeting the element the price is contained within, instead you're targeting the p parent of that element which contains the text "100+ tickets".

Instead, you need to select the .price-range element:

$price=$con->find('div.event-availability p span.price-range',0)->innertext;