<?php
$words = array("jack", "jacker", "jackman");
$scores = array();
$checkAgainst = "jackman";

// Calculating scores
for($i=0; $i < count($words); $i++) {
	similar_text($checkAgainst, $words[$i], $score);
	$scores[$i] = $score;
}

// Sorting
array_multisort($scores, SORT_NUMERIC, SORT_DESC, $words, SORT_REGULAR);
print_r($words);
print_r($scores);
?>




