Quick snippet to find a string in a string in PHP: –
$question = 'How are you?';
if (strpos($question, 'are') !== false) {
echo 'Found it';
}
Quick snippet to find a string in a string in PHP: – $question = ‘How are you?’; if (strpos($question, ‘are’) !== false) { echo ‘Found it’; }
Quick snippet to find a string in a string in PHP: –
$question = 'How are you?';
if (strpos($question, 'are') !== false) {
echo 'Found it';
}
Subscribe to get the latest posts sent to your email.
Leave a comment