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 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); 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 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 Link to comment https://forums.phpfreaks.com/topic/201762-extracting/#findComment-1058389 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.