PHP multiple duplicate values ​​in a multidimensional array

I am trying to update the below array to set "duplicate" => true when both "name" and "date" are the same. In the below example 'array[1][duplicate]=>true' as both array[0] & array[1] have the same "name"=john & "date"=2015-7-24

Array
(
    [0] => Array
    (
        [id] => 1
        [name] => john
        [date] => 2015-07-24
        [duplicate] => false
    )

    [1] => Array
    (
        [id] => 1
        [name] => john
        [date] => 2015-07-24
        [duplicate] => false
    )

    [2] => Array
    (
        [id] => 1
        [name] => jane
        [date] => 2015-07-24
        [duplicate] => false
    )

    [3] => Array
    (
        [id] => 1
        [name] => notJaneORJohn
        [date] => 2015-07-24
        [duplicate] => false
    )

    [4] => Array
    (
        [id] => 1
        [name] => jane
        [date] => 2099-07-24
        [duplicate] => false
    )

)


Try this,

$array = Array
(
    0 => Array
    (
        'id' => '1',
        'name' => 'john',
        'date' => '2015-07-24',
        'duplicate' => 'false',
    ),

    1 => Array
    (
        'id' => 1,
        'name' => 'john',
        'date' => '2015-07-24',
        'duplicate' => 'false'
    ),

    2 => Array
    (
        'id' => 1,
        'name' => 'jane',
        'date' => '2015-07-24',
        'duplicate' => 'false'
    ),

    3 => Array
    (
        'id' => 1,
        'name' => 'notJaneORJohn',
        'date' => '2015-07-24',
        'duplicate' => 'false'
    ),

    4 => Array
    (
        'id' => 1,
        'name' => 'jane',
        'date' => '2099-07-24',
        'duplicate' => 'false'
    )

);
foreach ($array as $key => $value) {
    for ($i = $key + 1 ; $i < sizeof($array); $i++) {
        if ($value['name'] === $array[$i]['name'] && $value['date'] === $array[$i]['date']) {
            $array[$key]['duplicate'] = 'TRUE';
            $array[$i]['duplicate'] = 'TRUE';
        }
    }
}