I am trying to write a php function which scripts the filename out of the end of a path. For instance, I would like
$tmp = 'c:\test\bob\bobs.php';
to be:
$tmp1 = 'c:\test\bob\'
any ideas?
I've tried exploding the string using
$test = explode("\", $tmp);
for ($i = 0; i < count($test)-1 ; i++) {
echo $test[$i];
}
but that doesn't seem to work.
thanks in advance