A simple solution is to slice the path up into parts, and then manipulate the array before sticking it back together again:
join("/", array_slice(explode("/", $path), 5));
Of course, if you wanted to remove that specific path, you could also use a regular expression:
preg_replace('~^/home/john/smith/web/~', '', $path);
One word of advice though. If your application is juggling around with paths a lot, it may be a good idea to create a class to represent paths, so as to encapsulate the logic, rather than have a lot of string manipulations all over the place. This is especially a good idea, if you mix absolute and relative paths.