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
Post a Comment