possible answers to your questions:
1. you could split the search-query, by using the whitespace. then you have to loop over the search-options, during the foreach loop:
PHP Code:
$search = explode(' ', $search);
foreach ($file as $line => $data)
{
list($month, $day, $year, $info) = explode('|', trim($data) );
for($i=0; $i<sizeof($seach); $i++){
if (stristr($info, $search[$i]))
{
echo $info;
}
}
}
2. instead of overwriting the same variables (list($month, $day, $year, $info)), you have to use them as an array. then use the sort() function to sort the array. This way you will have to double loop over your data, as you can't display for the search query an sort the array at the same time. then the year wouldn't be displayed ordered.
3. Do you mean newlines or just whitespace? if it's just whitespace, use the str_replace function to replace ' ' by ' ', then there should be no problem. if it's newlines, then i have no idea.
Greetz,
UnrealEd