[ create a new paste ] login | about

Link: http://codepad.org/bu3juNj1    [ raw code | output | fork ]

PHP, pasted on Aug 6:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php
$rows = Array("email@gmail.com","test@gmail.com","tester@gmail.com","vin@gmail.com");

$contacts = Array
(
    "test@gmail.com" => "test@gmail.com",
    "ram@gmail.com" => "Ram",
    "vin@gmail.com" => "Vinay",
    "man_test@yahoo.com" => "Manoj",
    "homan@rediffmail.com" => "Homan"
);


print_r($contacts = array_diff_key($contacts, array_flip($rows)));


Output:
1
2
3
4
5
6
Array
(
    [ram@gmail.com] => Ram
    [man_test@yahoo.com] => Manoj
    [homan@rediffmail.com] => Homan
)


Create a new paste based on this one


Comments: