Get characters after last / in url

后端 未结 8 919
梦谈多话
梦谈多话 2020-11-30 20:05

I want to get the characters after the last / in an url like http://www.vimeo.com/1234567

How do I do with php?

8条回答
  •  感情败类
    2020-11-30 20:23

    $str = "http://www.vimeo.com/1234567";
    $s = explode("/",$str);
    print end($s);
    

提交回复
热议问题