Destramic Posted May 14, 2010 Share Posted May 14, 2010 im working on a directory index script and i need to extract filename out of a sting which could look like this index.php news.htm and just return index or news....without the file format...does anyone know of a tutorial that could help please...thank you Quote Link to comment https://forums.phpfreaks.com/topic/201762-extracting/ Share on other sites More sharing options...
salathe Posted May 14, 2010 Share Posted May 14, 2010 Take a look at pathinfo -- pathinfo("news.htm", PATHINFO_FILENAME); Quote Link to comment https://forums.phpfreaks.com/topic/201762-extracting/#findComment-1058372 Share on other sites More sharing options...
kenrbnsn Posted May 14, 2010 Share Posted May 14, 2010 Also look at the basename function. Ken Quote Link to comment https://forums.phpfreaks.com/topic/201762-extracting/#findComment-1058374 Share on other sites More sharing options...
Destramic Posted May 14, 2010 Author Share Posted May 14, 2010 that wrked great...thanks Quote Link to comment https://forums.phpfreaks.com/topic/201762-extracting/#findComment-1058389 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.