Create SQL search condition
static public makeTextSearch ( $val, $not = false ) : search | ||
$val | string value to search | |
$not | boolean is a negative search ? (false by default) | |
return | search | string |
$text = "This is a sample text"; $search = "sample"; $result = makeTextSearch($search, $text); // Output if($result) { echo "Word found"; } else { echo "Word not found"; }
$text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque tincidunt est a ligula lacinia mattis. Fusce tempus velit lobortis diam blandit fringilla. Sed sagittis nisl at magna tempor, sit amet blandit nunc congue. Integer vel enim in elit faucibus convallis. Nullam in purus metus. "; $search = array("Lorem", "consectetur", "tempus"); $result = makeTextSearch($search, $text); // Output foreach($result as $key => $value) { echo "Word \"".$key."\" found ".$value." times.Package/Library: Based on the examples given, it is not possible to determine which package/library makeTextSearch belongs to. It is likely a custom function created by the developer or a function included in a custom library.
"; }
static public makeTextSearch ( $val, $not = false ) : search | ||
$val | string value to search | |
$not | boolean is a negative search ? (false by default) | |
return | search | string |