Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $str = 'https://www.site.ru/upload/iblock/24f/24f5cc6b40fc61d996aab5598334139a.pdf';
- echo array_reverse(explode('/', $str))[0];
- // or this one will suit your needs as well:
- echo substr($str, strrpos($str, '/') + 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement