get string from specific character in php code example
Example 1: php get first 5 characters of string
$result = substr("Hello How are you", 0, 5); //first 5 chars "Hello"
Example 2: get substring after character php
<?php
$my_url = 'http://www.example.com/5478631';
echo substr($my_url, strrpos($my_url, '/' )+1)."\n";
?>
// print: 5478631