| | | | |
| |||||||
| PHP-Fortgeschrittene Arbeiten mit PHP ohne Einschränkungen |
|
| | LinkBack | Themen-Optionen | Thema bewerten |
| | |
| Erfahrener Benutzer | Sry wenn das jetzt falsch war, wenn ich diesen Thread geöffnet habe... ich habe waq schon ne pn geschrieben aber ich muss jetzt weg vom pc und will die Lösung noch posten (Es handelt sich natürlich um die Frage aus dem Thread gleichen Namens). zum Originalthread PHP-Code: Code: Array
(
[0] => Array
(
[wert1] => 4
[wert2] => 6
[wert3] => lala
)
[1] => Array
(
[wert1] => 13
[wert2] => 1
[wert3] => abc
)
[2] => Array
(
[wert1] => 6000
[wert2] => -7
[wert3] => Haus
)
[3] => Array
(
[wert1] => 1
[wert2] => 11
[wert3] => foo
)
[4] => Array
(
[wert1] => 99
[wert2] => 38
[wert3] => bar
)
)
Array
(
[3] => Array
(
[wert1] => 1
[wert2] => 11
[wert3] => foo
)
[4] => Array
(
[wert1] => 99
[wert2] => 38
[wert3] => bar
)
[1] => Array
(
[wert1] => 13
[wert2] => 1
[wert3] => abc
)
[2] => Array
(
[wert1] => 6000
[wert2] => -7
[wert3] => Haus
)
)
Array
(
[4] => Array
(
[wert1] => 99
[wert2] => 38
[wert3] => bar
)
[3] => Array
(
[wert1] => 1
[wert2] => 11
[wert3] => foo
)
[5] => Array
(
[wert1] => 4
[wert2] => 6
[wert3] => lala
)
[1] => Array
(
[wert1] => 13
[wert2] => 1
[wert3] => abc
)
[2] => Array
(
[wert1] => 6000
[wert2] => -7
[wert3] => Haus
)
)
Array
(
[3] => Array
(
[wert1] => 1
[wert2] => 11
[wert3] => foo
)
[1] => Array
(
[wert1] => 13
[wert2] => 1
[wert3] => abc
)
[4] => Array
(
[wert1] => 99
[wert2] => 38
[wert3] => bar
)
[2] => Array
(
[wert1] => 6000
[wert2] => -7
[wert3] => Haus
)
)
Array
(
[0] => Array
(
[wert1] => 4
[wert2] => 6
[wert3] => lala
)
[3] => Array
(
[wert1] => 1
[wert2] => 11
[wert3] => foo
)
[4] => Array
(
[wert1] => 99
[wert2] => 38
[wert3] => bar
)
[1] => Array
(
[wert1] => 13
[wert2] => 1
[wert3] => abc
)
[2] => Array
(
[wert1] => 6000
[wert2] => -7
[wert3] => Haus
)
)
|
| | |
| | |
| PHP Code Flüsterer Registriert seit: 21.08.2005 Beiträge: 4682 PHP-Kenntnisse: Fortgeschritten | |
| | |
| Erfahrener Benutzer Registriert seit: 25.04.2005
Beiträge: 1.356
![]() | das hättes du auch wesentlich einfacher haben können http://www.php.net/manual/de/function.usort.php http://www.php.net/manual/de/function.uasort.php http://www.php.net/manual/de/function.uksort.php |
| | |
| | ||
| Gast
Beiträge: n/a
| Buhmann: Dein Programm ist irgendwie fehlerhaft Wenn ich folgendes Array nach dem 2. Eintrag jeder Zeile sortieren will: Code: $array = array(
array(1,3,1,1),
array(2,5,2,2),
array(3,2,3,3),
array(4,1,4,4),
array(5,4,5,5),
);
print_r($array);
$array = array_dimensionsort($array,1);
print_r($array);
Und die Indexverbindungen werden auch beibehalten, obwohl ich das nicht will: Code: Array
(
[3] => Array
(
[0] => 4
[1] => 1
[2] => 4
[3] => 4
)
[2] => Array
(
[0] => 3
[1] => 2
[2] => 3
[3] => 3
)
[4] => Array
(
[0] => 5
[1] => 4
[2] => 5
[3] => 5
)
[1] => Array
(
[0] => 2
[1] => 5
[2] => 2
[3] => 2
)
)
Zitat:
| |
|
|
| Themen-Optionen | |
| Thema bewerten | |
|
|
Ähnliche Themen | ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| If-Abfrage mit mehrdimensionalen Arrays fehlerhaft | aherzog | PHP Tipps 2008 | 19 | 23.06.2008 08:16 |
| JavaScript/PHP: qooxdoo 0.7.1 - Teil 1 : Eine Einführung | Zergling-new | Tutorials | 6 | 25.01.2008 10:41 |
| eindimensionale arrays sortieren | webazubi | PHP Tipps 2007 | 5 | 23.03.2007 18:11 |
| Sortieren eines Arrays mittels Funktion ? | madSoul | PHP Tipps 2007 | 16 | 22.02.2007 11:49 |
| Arrays sortieren, Bezeichnung, Preis | Ticos | PHP Tipps 2006 | 4 | 07.09.2006 19:37 |
| Fehlermeldung beim Sortieren meines Arrays... | GELight | PHP Tipps 2006 | 5 | 27.04.2006 22:08 |
| [Erledigt] 2 Arrays miteinander vergleichen | PHP Tipps 2007 | 3 | 17.12.2005 16:54 | |
| Arrays alphabetisch sortieren | seven-12 | PHP Tipps 2007 | 4 | 17.11.2005 14:33 |
| Sortieren von Arrays mit mehr als 2 Dimensionen | PHP-Fortgeschrittene | 8 | 05.07.2005 16:48 | |
| Problem beim Sortieren | PHP Tipps 2005-2 | 5 | 29.06.2005 07:00 | |
| sortieren von arrays aus mysql | Datenbanken | 7 | 28.04.2005 21:53 | |
| 5 assosiative arrays gleichzeitig sortieren | PHP Tipps 2004-2 | 2 | 13.12.2004 14:07 | |
| Erkennung von Arrays in Strings | PHP-Fortgeschrittene | 15 | 07.12.2004 13:00 | |
| Arrays nachträglich (Inhalte) zählen und sortieren | Gumfuzi | PHP Tipps 2004-2 | 3 | 20.11.2004 00:00 |
| Mehrdimensionale Arrays sortieren | Borlox | PHP Tipps 2004 | 5 | 23.09.2004 14:52 |

Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.