Find a needle in a haystack! If you need to see if a PHP string contains a word, this code snippet would work.
1 2 3 4 5 6 7 |
if (!strpos($url,'dog')) { echo 'No dog.'; } else { echo 'Found dog.'; } |
Find a needle in a haystack! If you need to see if a PHP string contains a word, this code snippet would work.
1 2 3 4 5 6 7 |
if (!strpos($url,'dog')) { echo 'No dog.'; } else { echo 'Found dog.'; } |
© 2022 CODEHAVEN