Check If String Contain . Php Code Example


Example 1: how to check if a string contains a substring in php

$a = 'How are you?';  if (strpos($a, 'are') !== false) {     echo 'true'; }

Example 2: php find if string contains

if (strpos($string, 'substring') !== false) { 	// do stuff  }

Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?