$text1 = $Text; //Frage
$text2 = $get['a']; //antwort
$words1 = array_filter(preg_split('/\s+/', $text1), create_function('$val', 'return $val !== "";'));
$words2 = array_filter(preg_split('/\s+/', $text2), create_function('$val', 'return $val !== "";'));
foreach( $words2 as $word )
{
if( ($pos = array_search($word, $words1)) !== false )
{
$zahl .= $pos;
echo $pos;
}
}