Skip to content

Instantly share code, notes, and snippets.

/doublet.php Secret

Created September 1, 2015 12:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/063f41840ccff44c9a11 to your computer and use it in GitHub Desktop.
Save anonymous/063f41840ccff44c9a11 to your computer and use it in GitHub Desktop.
<?php
$query = new data_DataBaseQuery();
$SQL = "Select name from ima_supplier";
if ($query->doQuery($SQL) && $query->num_rows()) {
$rows = $query->fetch_all();
$anz = count ( $rows );
for($i = 0; $i < $anz; $i ++) {
for($j = 0; $j < $anz; $j ++) {
if ($i !== $j) {
similar_text ( $rows [$i] ['name'], $rows [$j] ['name'], $percent);
if($percent >= 90) {
$duplicate = array($this) ;
}
}
}
}
echo $duplicate;
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment