johnsmith153 Posted September 17, 2009 Share Posted September 17, 2009 I want to allow all letters and the & character $allowed = "/[^a-z\\040]/i"; I am sure I need a slight change to the above line of code. Quote Link to comment Share on other sites More sharing options...
nrg_alpha Posted September 17, 2009 Share Posted September 17, 2009 You start your character class with ^, which negates the entire class.. If you want to allow only letters and the ampersand character, then perhaps something along the lines of: $allowed= '#^[a-z\x26]+$#i'; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.