Capital and lowercase letter php, Im making a min search on my news page and I need some assistance
<p>Im making a min search on my news page and I need some help. It works great except for 2 little things, the searches need to be written in capital or lowercase letter according to the titles of the article pages names, so if the title of a article page is "The New Thing" and the user would write "the new thing" nothing would come out.</p>

<p>Second thing is that when more than one word is written in the search doesn't recognized article pages that have on of the words. So if we have the two titles "The New Thing" and "The New Game", and the user types "New Game" only the second one will appear is there a way to make it so that the one with most matches appers on top and the other below it?</p>

<p>the form</p>

<pre><code>&lt;form name="form1" method="post" action="mini search engine.php"&gt;
&lt;input name="search" type="text" id="search" value="" size="50" class="wide" /&gt;
&lt;input name="Submit" type="submit" class="style5" value="Submit" /&gt;
&lt;/form&gt;
</code></pre>

<p>the php</p>

<pre><code>&lt;?php
$search = $_POST['search'];
$result = str_replace(" ", "*", $search);

$files = array_slice(glob('news/*'.$result.'*.php'), 0, 9);
sort($files);
foreach ($files as $f) {
include $f; 
} ?&gt; 
</code></pre>
