#194206 - 2009-06-10 04:23 PM
Re: String manipulation
[Re: Darren_W]
|
eriqjaffe
Hey THIS is FUN
Registered: 2004-06-24
Posts: 214
Loc: Arlington Heights, IL USA
|
You could always split and rejoin.
$file = "c:\document and settings\users\test.txt"
$array = split($file,"\")
for $x = 0 to ubound($array) -1
$path = $path + $array[$x] + "\"
next
? $path
|
Top
|
|
|
|
#194210 - 2009-06-10 05:11 PM
Re: String manipulation
[Re: Darren_W]
|
Richard H.
Administrator
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
You don't actually need the loop:
$file = "c:\document and settings\users\test.txt"
$array = split($file,"\")
$path=Join($array,"\",UBound($array))+"\"
$path+@CRLF
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 466 anonymous users online.
|
|
|