ashleek007 Posted May 24, 2007 Share Posted May 24, 2007 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 Quote Link to comment Share on other sites More sharing options...
ashleek007 Posted May 24, 2007 Author Share Posted May 24, 2007 <?php $str = 'foo\\\o'; $str = preg_replace('/\\\/', '', $str); echo $str; ?> Sorry just found the code... im stupid... cheers, Ash Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.