<?php
$str = "Lots of text here. Lots of text here. Name: Someone ID: 93493284
Lots of text here. Type: person Lots of text here. Lots of text here.";
if(preg_match('#Name: (.*?) #',$str,$n)) {
$name = $n[1];
}
if(preg_match('#ID: (.*?) #',$str,$i)) {
$id = $i[1];
}
if(preg_match('#Type: (.*?) #',$str,$t)) {
$type = $t[1];
}
?>
I think that this should work, but I haven't tested it!