programming-examples/php/String/PHP script to get the characters after the last 'forward slash' in an url..php

4 lines
108 B
PHP
Raw Permalink Normal View History

2019-11-15 12:59:38 +01:00
<?php
$my_url = 'http://www.example.com/5478631';
echo substr($my_url, strrpos($my_url, '/' )+1)."\n";
?>