php - Using find with phpQuery -


i have started using phpquery, , documentation isn't particularly , not been able find many examples on web.

i wanted pass html phpquery , match string.

ie.

$html = '<div>blah blah blah <a href=1.php>xssss</a></div>'; 

and here want search $html 1.php if found should return text "found it"

i tried doesn't work:

  $doc = phpquery::newdocumenthtml($html); 
if(pq($doc)->find('12.php')) {    echo 'found it';   }else{    echo 'not found'; } 

as output on 'found it'.

thanks in advance


Comments

Popular posts from this blog

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

c++ - OpenMP unpredictable overhead -

javascript - Wordpress slider, not displayed 100% width -