Posted on September 10, 2018October 6, 2018How to find a specific string in a variable Code: $var = "I am a developer"; if (strpos($var, 'dev') !== false) { echo 'true'; } Output: true