Re: [PHP] array.sorting.php

2012-09-04 Thread Matijn Woudt
On Tue, Sep 4, 2012 at 9:33 PM, John Taylor-Johnston wrote: > Matijn Woudt wrote: >> >> Taken from the natsort manual page comments: >> >> > /** >> * keyNatSort does a natural sort via key on the supplied array. >> * >> * @param $array The array to natural sort via key. >> * @param $s

Re: [PHP] array.sorting.php

2012-09-04 Thread John Taylor-Johnston
Matijn Woudt wrote: Taken from the natsort manual page comments: I've tried it. I don't see it sorting anything? http://cegepsherbrooke.qc.ca/~languesmodernes/test/keynatsort.php $words = preg_split('/[[:space:]]+/',$mynewstring); foreach ($words as $word) { $freq[$word]++; } function

Re: [PHP] array.sorting.php

2012-09-04 Thread Matijn Woudt
On Tue, Sep 4, 2012 at 9:20 PM, John Taylor-Johnston wrote: > > Here is my code: > ---snip--- > $mynewstring = "http://foo.com/bigtextfile.txt";; > > $words = preg_split('/[[:space:]]+/',$mynewstring); > > foreach ($words as $word) { > $freq[$word]++; > } > > #natca

Re: [PHP] array.sorting.php

2012-09-04 Thread Matijn Woudt
On Tue, Sep 4, 2012 at 7:38 PM, John Taylor-Johnston wrote: > > David OBrien wrote: >> >> On Tue, Sep 4, 2012 at 1:15 PM, John Taylor-Johnston >> mailto:jt.johns...@usherbrooke.ca>> wrote: >> >> Hi, >> Sorting question. http://www.php.net/manual/en/array.sorting.php >> >> I'm using kso

Re: [PHP] array.sorting.php

2012-09-04 Thread Stuart Dallas
http://php.net/uksort -- Sent from my leaf blower On 4 Sep 2012 18:39, "John Taylor-Johnston" wrote: > > David OBrien wrote: > >> On Tue, Sep 4, 2012 at 1:15 PM, John Taylor-Johnston < >> jt.johns...@usherbrooke.ca >> > >> wrote: >> >> Hi, >> Sortin

Re: [PHP] array.sorting.php

2012-09-04 Thread John Taylor-Johnston
David OBrien wrote: On Tue, Sep 4, 2012 at 1:15 PM, John Taylor-Johnston mailto:jt.johns...@usherbrooke.ca>> wrote: Hi, Sorting question. http://www.php.net/manual/en/array.sorting.php I'm using ksort, which sorts like this. I don't want to use strolower. Is there a functio

Re: [PHP] array.sorting.php

2012-09-04 Thread Matijn Woudt
On Tue, Sep 4, 2012 at 7:23 PM, John Taylor-Johnston wrote: > The problem is I'm sorting the key. The alphabetical thing is in the key. > > David OBrien wrote: >> Taken from the natsort manual page comments: - Matijn PS. Please bottom post on this and probably any mailing list -- PHP Genera

Re: [PHP] array.sorting.php

2012-09-04 Thread John Taylor-Johnston
The problem is I'm sorting the key. The alphabetical thing is in the key. David OBrien wrote: On Tue, Sep 4, 2012 at 1:15 PM, John Taylor-Johnston mailto:jt.johns...@usherbrooke.ca>> wrote: Hi, Sorting question. http://www.php.net/manual/en/array.sorting.php I'm using ksort, whi

Re: [PHP] array.sorting.php

2012-09-04 Thread David OBrien
On Tue, Sep 4, 2012 at 1:15 PM, John Taylor-Johnston < jt.johns...@usherbrooke.ca> wrote: > Hi, > Sorting question. > http://www.php.net/manual/en/**array.sorting.php > I'm using ksort, which sorts like this. > I don't want to use strolower. > Is th

[PHP] array.sorting.php

2012-09-04 Thread John Taylor-Johnston
Hi, Sorting question. http://www.php.net/manual/en/array.sorting.php I'm using ksort, which sorts like this. I don't want to use strolower. Is there a function/switch in one of the sort functions where I could get another aphabetical sort? http://www.php.net/manual/en/array.sorting.php has a lo