Skip to content

PHP code snippet – How if charactor is exist in text in laravel?

 $str_contains = $request->birthDay;
if(str_contains($request->birthDay , '-')){
  return 'this text contains "-" charactors';
}elseif(str_contains($request->birthDay , '/')){
  return 'this text contains "/" charactors';
}
See also  Java code snippet - How to perform zoom in selenium ?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.