So I have this script that extracts a given string within a bigger string:
function get_string($string, $start, $end){
 $string = " ".$string;
 $pos = strpos($string,$start);
 if ($pos == 0) return "";
 $pos += strlen($start);
 $len = strpos($string,$end,$pos) - $pos;
 return substr($string,$pos,$len);
}
So this is the string:
$string= '<b>Sample Sample</b> <b>Sample2 Sample2</b>';
$output = get_string($string, '<b>','</b>');
echo $output;
I really want some help on this because I'm out of ideas. Now when i echo $output I get
Sample Sample
I want to make a change that would display both:
Sample Sample 
Sample2 Sample2
Does any of you guys have any ideas how to modify the function and make it output sort
of an array of results  $output[0], $output[1]?
Thank you in advance, Wish you a good day.
preg_match_all()php.net/manual/en/function.preg-match-all.php