I need to parse an HTML document and to find all occurrences of string asdf in it.
asdf
I currently have the HTML loaded into a string variable. I would just
Its better to use substr_count . Check out on php.net
substr_count