Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP: is there an isLetter() function or equivalent?

I am no PHP expert. I am looking for the PHP equivalent of isLetter() in Java, but I can't find it. Does it exist?

I need to extract letters from a given string and make them lower case, for example: "Ap.ér4i5T i6f;" should give "apéritif'. So, yes, there are accentuated characters in my strings.

like image 771
Jérôme Verstrynge Avatar asked Mar 15 '12 14:03

Jérôme Verstrynge


People also ask

How do you check if a character is a letter in PHP?

PHP | ctype_alpha() (Checks for alphabetic value) A ctype_alpha() function in PHP used to check all characters of a given string are alphabetic or not. If all characters are alphabetic then return True otherwise return False.


1 Answers

ctype_alpha().

like image 127
Oliver Charlesworth Avatar answered Oct 15 '22 11:10

Oliver Charlesworth