This is using strlen and strrpos to shorten a string but the last word will not be split into two, strrpos and strlen will work out the very last value are and substr is used to cut the rest off