Re: RE: php-general Digest 9 Dec 2011 20:09:28 -0000 Issue 7604

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 12, 2011 at 1:06 PM, David Savage <dsavage@xxxxxxxxxxxx> wrote:

> Would "ksort($sortarr,SORT_STRING)" on a 1 dimensional array with a key
> comprised of
> a person's name,
> "-", and
>  time stamp
> I..E. (key:  david savage-2011-12-12 14:43:00)
> actually delete duplicate keys from the array, if there were two keys the
> same ?
>

Unless I'm missing something, you couldn't have two entries with the same
key in the array to begin with.

    $a = array();
    $a['david savage-2011-12-12 14:43:00'] = 1;
    $a['david savage-2011-12-12 14:43:00'] = 2;
    print_r($a);

    Array
    (
        [david savage-2011-12-12 14:43:00] => 2
    )

David

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux