Jump to content

stripping all non alpha-numeric characters from string


bcamp1973

Recommended Posts

ok, i want to strip all instances of "\r\n", "\r", "\n","\t" and non-alpha numeric characters from a string. in my searching through the PHP manual there seems to be a lot of options...such as str_replace, preg_replace(), ereg_replace() etc. i need something that's fast an efficient and i'm guessing i'll have to use regex of some form but it's not something i'm very knowledgable of.  any suggestions?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.