Jump to content

[SOLVED] stripping backslashes using preg_replace


ashleek007

Recommended Posts

hi all,

 

I'm trying to strip these \\\\ out of a variable...

 

i know how to strip the white spaces here: -

 

<?php
$str = 'foo   o';
$str = preg_replace('/\s\s+/', ' ', $str);
// This will be 'foo o' now
echo $str;
?> 

 

But i need to strip these backslashes...

Any ideas,

Cheers,

Ash

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.