public static function subStringAfterLast($haystack, $needle, $n = 1)
    {
        $string = "";
        while ($n>0) {
            $string .= substr($haystack, strrpos($haystack, $needle) + 1);
            if($n>1){
                $string = $needle . $string;
            }
            $n--;
        }
        return $string;
    }