Jump to content

[SOLVED] preg_replace question about whitespace


sKunKbad

Recommended Posts

I have a need to strip out \r\n AND \t, but can't use \s or my string becomes unusable.

 

Right now I have:

$menu=preg_replace("|\r\n|", "", $menu);
$menu=preg_replace("|\t|", "", $menu);

 

It doesn't seem like it would be efficient, but I don't know of any other way to do what I need to do. Is this OK?

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.