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. Link to comment https://forums.phpfreaks.com/topic/174621-allowed-a-z040i-how-also-allow-sign/ 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'; Link to comment https://forums.phpfreaks.com/topic/174621-allowed-a-z040i-how-also-allow-sign/#findComment-920421 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.