Hey Guys,
Sorry if this has been posted before but i couldnt see the answer anywhere 😕 😕
What i need to do is check if a . is present in my string and if it is then enclose the whole string in ""
E.g:
The function thereisdot() does not exist and just used to try and explain what i trying to achieve....
$ValidSearchCriteria = '+' . $SearchCriteria . "*";
$ValidSearchCriteria = str_replace(' ',' +', $ValidSearchCriteria);
$CharCheck = thereisdot($ValidSearchCriteria)
if ($CharCheck == 'Y')
{
$ValidSearchCriteria = "\"" . $ValidSearchCriteria . "\"";
}else
{
$ValidSearchCriteria = $ValidSearchCriteria;
}
Any help / comments would be greatly appreciated 😃