Jump to content

explode function


seularts

Recommended Posts

here try this

$filename = ereg("/(.*\..{3,4})"), $str, $arr) ? $arr[1] : "No File Name";

 

you shouldn't need a loop if you just need the filename like that.

Regex can chop it all up no matter how long it is

 

 

EDIT: I had to edit the code btw

Link to comment
https://forums.phpfreaks.com/topic/105016-explode-function/#findComment-537544
Share on other sites

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.