How to match exact string in a webpage in PHP?
- by Karthik
We can easily check for a match in a string
if (preg_match("/happy/i", "happy is he who has ")) {
echo "match found.";
} else {
echo "match not found.";
}
?>
But how to check for the occurrence of match in a webpage or given a url?