Woodburn2006 Posted May 29, 2007 Share Posted May 29, 2007 if i have an image at the address: http://www.domain.com/images/picture.jpg how do i get it so that php splits it up and i am left with just picture.jpg? Link to comment https://forums.phpfreaks.com/topic/53422-splitting-a-filename/ Share on other sites More sharing options...
kenrbnsn Posted May 29, 2007 Share Posted May 29, 2007 You probably want to use the function pathinfo() <?php $str = 'http://www.domain.com/images/picture.jpg'; $pi = pathinfo($str); echo $pi['basename']; ?> Ken Link to comment https://forums.phpfreaks.com/topic/53422-splitting-a-filename/#findComment-263968 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.