Probably a stupid question (if such a thing exists), but searching this site doesn't work, so...
If I "explode" or "split" something into strings, how do I reference the final string (if I don't split it into a set number of strings)? For instance, if I'm exploding a domain name (using something like this:
<?php
$hostname = "computer4A.somehost.com";
$expname = explode (".", $hostname);
?>), how do I check to see if the last string is .com, .net, .edu, etc.... if I don't know how many strings there will be after explosion?