exist text php code example Example: check if text exists in string php $a = 'How are you?'; if (strpos($a, 'are') !== false) { echo 'true'; }