Answer the question
In order to leave comments, you need to log in
How to tell if phpQuery didn't find anything?
And how to write it in an if condition?
Answer the question
In order to leave comments, you need to log in
Not sure, but you can try:
$document = phpQuery::newDocument( /* url */ );
if(count($document->find('div')) > 0) { }
// или
if(!empty($document->find('div'))) { }
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question