Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

str_contains php 5

// For php < 8
/**
 * Determine if a string contains a given substring.
 *
 * @param  string  $haystack
 * @param  string  $needle
 * @return bool
 */
function str_contains($haystack, $needle)
{
	return $needle !== '' && self::strpos($haystack, $needle) !== false; 
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php
ADD COMMENT
Topic
Name
2+6 =