私はこのような配列を持っています:
Array
(
[0] => Saturday 19th January 2013 07:59:57 PM
[1] => Sunday 20th January 2013 07:00:26 PM
[2] => Monday 21st January 2013 02:08:15 PM
[3] => Monday 21st January 2013 02:11:00 PM
[4] => Monday 21st January 2013 02:41:02 PM
[5] => Monday 21st January 2013 02:42:14 PM
[6] => Monday 21st January 2013 03:03:34 PM
[7] => Monday 21st January 2013 03:07:39 PM
[8] => Monday 21st January 2013 03:37:11 PM
[9] => Monday 21st January 2013 03:37:52 PM
[10] => Monday 21st January 2013 04:14:08 PM
[11] => Monday 21st January 2013 04:16:38 PM
[12] => Monday 21st January 2013 04:19:18 PM
[13] => Monday 21st January 2013 05:45:17 PM
[14] => Monday 21st January 2013 06:39:04 PM
[15] => Monday 21st January 2013 08:01:56 PM
[16] => Monday 21st January 2013 08:03:23 PM
[17] => Monday 21st January 2013 08:12:15 PM
[18] => Monday 21st January 2013 08:15:20 PM
[19] => Monday 21st January 2013 08:29:57 PM
[20] => Monday 21st January 2013 09:57:25 PM
[21] => Tuesday 22nd January 2013 01:57:59 AM
[22] => Tuesday 22nd January 2013 06:39:34 AM
[23] => Tuesday 22nd January 2013 11:38:25 AM
[24] => Tuesday 22nd January 2013 03:21:08 PM
[25] => Tuesday 22nd January 2013 04:09:36 PM
}
この配列をグループ化して、次のようにします。
Array
(
[Saturday 19th January 2013 07:59:57 PM] => 1
[Sunday 20th January 2013 07:00:26 PM] => 1
[Monday 21st January 2013 02:08:15 PM] => 19
[Tuesday 22nd January 2013 01:57:59 AM] => 5
}
ここで、キーは 20 ~ 23 文字に一致する前の配列からの一致した値である必要があり、値は前の配列からの一致した値の数です。どんな助けにも感謝します!