1

I'm searching for a php library which i can use like jquery on a php string. I have a string in php

$html = "<html><head></head><body><div><span>test</span></div></body></html>";

Now I want to use functions like $("body").find("div span").text();

Is there something like this available? I know you can solve this with regular expressions but the html -string is more complex than this example so I don't think this is a proper solution.

Already thanks!

user1013338
  • 57
  • 1
  • 9

1 Answers1

2

As pekka said, go on with phpquery. It's written following jquery syntax.

Shiplu Mokaddim
  • 56,364
  • 17
  • 141
  • 187