Replacing characters using php

K

kiran

hi,
i have retrieved path like below line
C:\\\\Program Files\\\\xyz\\\\

how can remove the unnecessary \ from the above line . i have used all
the functions available. if anyone knows about it kindly let ma know
 
F

frizzle

kiran said:
hi,
i have retrieved path like below line
C:\\\\Program Files\\\\xyz\\\\

how can remove the unnecessary \ from the above line . i have used all
the functions available. if anyone knows about it kindly let ma know

You are aware this is the javascript group?

Anyways,
$string = preg_replace( '/\\\\+/', '\\', $string );
should help you.

Frizzle.
 
D

Dr John Stockton

JRS: In article <[email protected]>
, dated Tue, 4 Jul 2006 04:23:45 remote, seen in
news:comp.lang.javascript said:
You are aware this is the javascript group?

It is a javascript group. There are several others, including no., fr.,
de., it.; and there is at least one Jscript group.
 
F

frizzle

Dr said:
JRS: In article <[email protected]>
, dated Tue, 4 Jul 2006 04:23:45 remote, seen in


It is a javascript group. There are several others, including no., fr.,
de., it.; and there is at least one Jscript group.

Smartpants. I wanted to point out this wasn't the PHP-group. Nor _any_
PHP group.

Frizzle.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top