Assuming your array is called $array1:
$paths = array();
foreach ($array1 as $data_ptr => $data)
{
if (!in_array($data['path'],$paths) $paths[] = $data;
}
sort($paths)
foreach($paths as $path_to_check)
{
foreach($array1 as $data_ptr => $data)
{
if ($data['path'] == $path_to
On 05 February 2004 04:33, Justin French wrote:
> Hi,
>
> I've read and re-read array_multisort(), but still can't get a grip on
> how to sort my array:
>
> Array
> (
> [0] => Array
> (
> [path_id] => 3
> [year] => 2004
> [month] => 02
>
would usort() be better for this?
Martin
> -Original Message-
> From: Justin French [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 5 February 2004 3:33 PM
> To: php
> Subject: [PHP] multi dimension array sort help
>
>
> Hi,
>
> I've read and re-read
Hi,
I've read and re-read array_multisort(), but still can't get a grip on
how to sort my array:
Array
(
[0] => Array
(
[path_id] => 3
[year] => 2004
[month] => 02
[day] => 05
[hits] => 3
[path] => home
)
4 matches
Mail list logo