Hi,
I am wanting to know if anyone can help me with some code to change the mapped drive?
I have a variable "X:/Home Directory/Directory/........." and I need to change it to "H:/Home Directory/Directory/.......... "
Cruzado_Mainfrm helped me with:
<?php
$str1 = "X:/Home Directory/Directory/";
$str2 = $str1;
$str2{0} = 'H'; //if not, change $str2{0} to $str2{1}
?>
...but it seems I also need to drop the first directory, so to finish with a string "H:/Directory/..."
Thanks in advance
updating a String
Moderator: General Moderators
- AVATAr
- Forum Regular
- Posts: 524
- Joined: Tue Jul 16, 2002 4:19 pm
- Location: Uruguay -- Montevideo
- Contact:
check string functions in php manual (example: http://www.php.net/substr), and you will figure it out.