How If Charactor Is Exist In Text In Laravel

[Solved] How If Charactor Is Exist In Text In Laravel | Php - Code Explorer | yomemimo.com
Question : how if charactor is exist in text in laravel

Answered by : mohamad-shahkhajeh

 $str_contains = $request->birthDay;
if(str_contains($request->birthDay , '-')){ return 'this text contains "-" charactors';
}elseif(str_contains($request->birthDay , '/')){ return 'this text contains "/" charactors';
}

Source : | Last Update : Wed, 10 Feb 21

Answers related to how if charactor is exist in text in laravel

Code Explorer Popular Question For Php