Bumping is frowned upon, and is generally not needed anyway.
Try something like this:
if(file_exists('searches.txt')) {
$searches = file('searches.txt');
$searches[] = "\n" . $search_string; // Replace $search_string with the variable you used.
if(count($searches) > 20) array_shift($searches);
$searches = implode('', $searches);
} else $searches = $search_string;
$fp = fopen('searches.txt', 'w');
fwrite($fp, $searches);
fclose($fp);
This will store up to 20 results in 'searches.txt' (in the same directory as the script), placing newer searches at the bottom of the file and dropping the first line to keep the list at 20 results (if needed).
Now, you can read the file as an array to easily output each term:
echo 'Last 20 searches: ';
$searches = file('searches.txt');
$list = '';
foreach($searches as $search) {
$list .= '"'. rtrim($search) . '", ';
}
echo rtrim($list, ', ');
outputs: Last 20 searches: "foo", "bar", "foobar"
etc.