php - Get last part of a string preceded by a forward slash -


i have following viemo url:

http://player.vimeo.com/video/5836196 

how able last part of url 5836196 using php?

you can use substr/strrpos-

substr( $url, strrpos( $url, '/' )+1 ); 

demo


Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

collision detection - C++ library for mesh to mesh intersection: what is available? -