- substr: documentation ( source)
- var_dump: documentation ( source)
- strpos: documentation ( source)
<?php
$string = "text/abc word two";
$result = substr( $string, strpos($string, '/') + 1);
$result = substr( $result, 0, strpos( $result, 'word'));
var_dump( $result);