Logo

Programming-Idioms

History of Idiom 39 > diff from v6 to v7

Edit summary for version 7 by :

Version 6

2015-08-19, 14:52:36

Version 7

2015-08-19, 15:06:41

Idiom #39 Check if string contains a word

Set boolean ok to true if string word is contained in string s as a substring, or to false otherwise.

Idiom #39 Check if string contains a word

Set boolean ok to true if string word is contained in string s as a substring, or to false otherwise.

Code
$ok = strpos($s, $word) !== false;