Okay, if you explode it and it is a three part extention
say
$name = explode('.'$whole);
if($name[3]){echo'Hey there is a fourth item here - $name[3]';}else{echo"no fourth item";}
when $name is something like mike.blunt.com.au (my personal site, for want of a better example)
you will end up (after exploding) with
$name[0]='mike';
$name[1]='blunt';
$name[2]='com';
$name[3]='au';
put it together however you like, just use an if statement to stop any additional . on the last character. I hope this is making sense. email me direct if you run into troubles.
mike