I'm trying to pick out all the words within a pre-determined pattern, but it's not working:
$html = "<tooltip>Do</tooltip> you<tooltip>know</tooltip>";
I want preg_match_all to return
Array ( [0] => Array ( [0] => Do) [1] => Array ( [0] => know ) )
Using this pattern:
preg_match_all("/<tooltip ?.*>(.*)<\/tooltip>/", $html, $matches);
Instead it's returning:
Array ( [0] => Array ( [0] => Do youknow ) [1] => Array ( [0] => know ) )
I'm guessing it's my pattern that's wrong, but I don't know what?>
Any ideas?
Thanks