Suppose we need to check $name in malayalm and english , Then add malayalam checking as below
if (preg_match(‘/^[\p{Malayalam}&\-\’. 0-9]+$/u’, $name)) {
return true;
} else {
return false;
}
Details of language code:
Suppose we need to check $name in malayalm and english , Then add malayalam checking as below
if (preg_match(‘/^[\p{Malayalam}&\-\’. 0-9]+$/u’, $name)) {
return true;
} else {
return false;
}
Details of language code: