• Howdy! Welcome to our community of more than 130.000 members devoted to web hosting. This is a great place to get special offers from web hosts and post your own requests or ads. To start posting sign up here. Cheers! /Peo, FreeWebSpace.net
managed wordpress hosting

How do i get rid ofa part of a string?

DanBoland

New Member
If i had a string like this:

$a = "/home/name/public_html/dir/dir2/index.html";

how could i make $b = "/dir/dir2/index.html";

Any one know?
 
Code:
$BaseDir = "/home/name/public_html";
$a = "$BaseDir/dir/dir2/index.html";
$b = "$BaseDir/dir/dir3/index.html";

If thats not what you mean, then be more specific.
 
Back
Top