beechy34 Posted March 24, 2009 Share Posted March 24, 2009 hi this is what i have done for name so far if (ereg("(^[a-zA-Z])", $nme)){echo $nme;} what i want to be able allow is the name o'conner and other names like thatcan you help thankyou Link to comment Share on other sites More sharing options...
justsomeguy Posted March 24, 2009 Share Posted March 24, 2009 It would be easiest to just allow the ' character. There are other letters besides O that precede that character. You'll also want to allow periods, spaces, and hyphens. Link to comment Share on other sites More sharing options...
beechy34 Posted March 24, 2009 Author Share Posted March 24, 2009 oh right cool how do you allow for spaces? Link to comment Share on other sites More sharing options...
mlybrand Posted March 24, 2009 Share Posted March 24, 2009 oh right cool how do you allow for spaces?[a-zA-Z' .\-]# note that the hyphen must be back-slash escaped as it is special within character classes (character classes are the expressions enclosed by square brackets)HTHMark Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.