<?php
function get_area($content, $start, $end){
 $ex = explode($start, $content);
 $ex2 = explode($end, $ex[1]);
 return $ex2[0];
}

$string = "just test 1";

//get and print 'test' string
$output = get_area($string, "just", "1");
print $output;
?>