<?php $userinfo = "Name: <b>PHP</b> <br> Title: <b>Programming Language</b>"; preg_match_all ("/<b>(.*)<\/b>/U", $userinfo, $pat_array); print $pat_array[0][0]." <br> ".$pat_array[0][1]."\n"; ?>