Jump to content

Isolate different parts of a string (AKA, everything after the last . )?


hatrickpatrick

Recommended Posts

Supposing I have a string, $string="hello.world.today";

Is there any function I can use to isolate everything after the last ., so it would output "today" on its own?

I'm trying to isolate the file extension of a URL (for example, www.whatever.com/index.php -> isolate 'php', or www.google.ie/index.html -> isolate 'html').

 

Is this possible? Any help would be much appreciated...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.