PHP - Sorting two array (numeric and string) at same time
<p>Yet another PHP question.  I've got two arrays: one string-based and the other numeric.  The array of strings contains the names of various buildings.  The numeric array tracks relevance of the search in relation to the buildings.</p>

<p>Example: I search for "Armory Building" (http://yoursite.com/search.php?building=Armory+Building)</p>

<p>I loop through all 25 buildings and display any containing one or more search terms (Armory and Building).</p>

<p>Armory Hall
Armory State Building
Armory Dining Hall Building</p>

<p>Obviously, if the search should bring up results based on relevance, the last two should appear FIRST. How do I sort it so that both arrays get re-ordered but maintain the same index, meaning I re-order the results based on relevance (the last 2 would have a "relevance" of 2 and the first result would have a "relevance" of 1).</p>
