Ich möchte E-Mails nach Domänen mischen, so dass sie so weit wie möglich voneinander entfernt. Beispiel:Mischen und trennen ähnliche Zeichenfolgen
Array vor:
[email protected], [email protected], [email protected], [email protected], [email protected], Email3 @ gmail. com, [email protected], [email protected]
Es wäre so etwas wie sein:
Array nach:
[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], email3 @ gmail .com
Wie kann ich es mit einem Array tun? Wenn es ein Beispiel mit PHP gibt, wäre es großartig.
Können Sie zeigen, was Sie bisher versucht haben? – mhatch
Dies könnte Ihnen den Einstieg erleichtern: http://php.net/manual/en/array.sorting.php – Katie