}
// check in the similar names array if your name exists, if so, adds 1 to suffix, then check again until you find your final suffix.
$suffix = 1;
while (in_array($name.$suffix, $similar_names))
$suffix++;
$name = $name.$suffix;