Hey,
I haver this script:
$i = -1;
while (substr($docRoot, $i, 1) != '/') {
$docRoot = substr_replace($docRoot, '', -1);
$i--;
}
I am running it on this string as $docRoot:
/home/test/public_html/lymmog
I am expecting it to come out like:
/home/rctneil/public_html/
but it comes out as:
/home/rctneil/public_html/lym
Any ideas why it’s only doing half?