I am using this php code
<title>Web Design <?php
echo ucwords(array_shift(explode(".",$_SERVER['HTTP_HOST'])));
?>, Website Design</title>
to grab the subdomain (subdomain.domain.co.uk) which works great However - I want it to ignore the hyphen and capitalise the words for hyphenated subdomains i.e. sub-domain.domain.co.uk => Sub Domain
What do I have to alter my code to?