Hey, I'm just wondering if there's any easy function to make text suitable to be in a link, say I have a bunch of caps, weird characters etc and I want it all to be lowercase with "-" instead of spaces, is there a function to do that or do I have to create my own?

You can try preg_replace (http://php.net/manual/en/function.preg-replace.php), which uses regular expressions, combined with strtolower.
That makes everything lowercase, then converts anything which is not a lowercase letter (such as a space) into a hyphen.