Using several functions together to extract a portion of a string
<?php
$test_string="testing testing Username:Michele Bond";
$position=strpos($test_string,"Username:");
$start=$position+strlen("Username:");
echo "$test_string<br />";
echo "$position<br />";
echo substr($test_string,$start);
?>
Related examples in the same category