conatine string php code example Example: string contains php $a = 'How are you?'; if (strpos($a, 'are') !== false) { echo 'true'; }