limit chars in string

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

limit chars in string

Post by pelegk2 »

if i recive a string from a user i want to check that some chars are not allowed (like for example all hebrew letters)
how do i so that?
thnaks in advance
peleg
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

If they are UTF-8 encoded, you can just check the ordinal range of the characters, however I can't think of anything that already does that easily..
Post Reply