here is an example outside of Data Assist Search that should help give a direction for accomplishing this:
<?php
$heystack = "The quick brown fox jumps over the lazzy dog. Humpty Dumpty sat on a wall. Jack and jill went up the hill";
$retStr = $heystack;
$heystackArray = explode(". ", $heystack);
if(isset($_POST['keyword']) && $_POST['keyword'] != "") {
$needle = $_POST['keyword'];
for($i = 0; $i < sizeof($heystackArray); $i++) {
$termArray = explode(" ", $heystackArray[$i]);
if(in_array($needle, $termArray)) $retStr = $heystackArray[$i];
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<input type="text" name="keyword" id="keyword" />
<input type="submit" name="button" id="button" value="Submit" />
</form>
<?php echo $retStr; ?>
</body>
</html>