Advertisement
Guest User

Untitled

a guest
Apr 11th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.22 KB | None | 0 0
  1. <?php
  2.  
  3. $str = 'https://www.site.ru/upload/iblock/24f/24f5cc6b40fc61d996aab5598334139a.pdf';
  4. echo array_reverse(explode('/', $str))[0];
  5. // or this one will suit your needs as well:
  6. echo substr($str, strrpos($str, '/') + 1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement