phpbar.de logo

Mailinglisten-Archive

[php] array sortieren nach zwei Kriterien

[php] array sortieren nach zwei Kriterien

Christoph Loeffler php_(at)_phpcenter.de
Sat, 2 Jun 2001 17:23:09 +0200


SGFsbG8sDQoNCiBpY2ggaGFiZSBlaW5lbiBBcnJheSwgZGVyIERhdGVpbmFtZW4gZW50aORsdCBp
bg0KIGRlciBGb3JtDQogICAgIGUwMV9KYW51YXJfMjAwMS5wZGYNCiAgICAgZTA0X0FwcmlsXzIw
MDEucGRmDQogICAgIGUxMl9EZXplbWJlcl8yMDAwLnBkZg0KICAgICBlMTFfTm92ZW1iZXJfMjAw
MC5wZGYNCiAgICAgZTAyX0ZlYnJ1YXJfMjAwMS5wZGYNCiAgICAgLg0KICAgICAuDQogIEljaCBt
9mNodGUgZGllc2VuIG51biBzb3J0aWVyZW4sIGRhc3MgaWNoDQogIHp1ZXJzdCBkaWUgdm9uIDIw
MDAgaW4gZGVyIFJlaWhlbmZvbGdlIGRlciBNb25hdGUgdW5kDQogIGRhbm4gZGllIHZvbiAyMDAx
IGluIGRlciBSZWloZW5mb2xnZSBkZXIgTW9uYXRlIGhhYmUuDQoNCiAgTWVpbiBBbnNhdHogbWl0
IHVzb3J0IHVuZCBkZW4gY21wLUZ1bmt0aW9uZW4NCg0KICBmdW5jdGlvbiBjbXAxICgkYSwgJGIp
IHsNCiAgICAgICAgJG1hID0gc3Vic3RyICgkYSwgMSwgMik7DQogICAgICAgICRtYiA9IHN1YnN0
ciAoJGIsIDEsIDIpOw0KICAgICAgICBpZiAoJG1hID09ICRtYikgcmV0dXJuIDA7DQogICAgICAg
IHJldHVybiAoJG1hIDwgJG1iKSA/IC0xIDogMTsNCiAgfQ0KDQogIGZ1bmN0aW9uIGNtcDIgKCRh
LCAkYikgew0KICAgICAgICAkeWEgPSBzdWJzdHIgKCRhLCAtNiwgMik7DQogICAgICAgICR5YiA9
IHN1YnN0ciAoJGIsIC02LCAyKTsNCiAgICAgICAgaWYgKCR5YSA9PSAkeWIp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