php string.sub code example
Example 1: php get part of string
substr ( $string , $start , $length );
/**Returns the extracted part of string;
*or FALSE on failure, or an empty string
*/
Example 2: php last of string till /
$string = 'Hello World Again';
$string = explode(' ', $string);
array_pop($string);
$string = implode(' ', $string);