I would like to know if there is any function that searches for a string in a string and returns a boolean value in PHP, tells whether the string contains or not, for example the method contains in Java?
You can try strpos() , http://php.net/strpos
strpos()
$str = "This is a sample string."; $findMe = "sample"; if (strpos($str, $findMe) !== false) { // you found me! }
Source: https://habr.com/ru/post/920453/More articles:Identification of graphs in a heap of related nodes - what is it called? - algorithmImage Recognition Frame / Guide - Augmented Reality - androidShould I use my own web API - asp.net-mvcBinding error in Knockout.js in IE9 compatibility view - domAlgorithm Analysis: Am I analyzing these algorithms correctly? How to approach such problems - c ++Adding a column via terminal - ruby-on-railsOpenCV packaging with python application - pythonTrunk routing with areas - javascriptUrl Encode Forward Slash (/) in .NET - c #Java group replacements regexp - javaAll Articles