Monday, May 23, 2011

Php Code: Extract Alpha Numeric Characters

This function extracts all alpha numeric letters and numbers from a string. Basically, it takes out everything that is not an alpha-numeric character, including spaces.

This function is useful in taking out excess characters before inserting data into mysql, i.e. "-" for phone numbers.

No comments:

Post a Comment