Remove duplicate items from an array
I use the line of code below to loop through a table in my database: $items_thread = $connection -> fetch_all($sql); And if I print the array out: print_r($items_thread); I will get this: Array ( [0] => Array ( [RecipientID] => 3 [RecipientScreenname] => Tom L [RecipientFirstname] => Thomas [RecipientEmail] => info@xx.com ) [1] => Array ( [RecipientID] => 3 [RecipientScreenname] => Tom L [RecipientFirstname] => Thomas [RecipientEmail] => info@xx.com ) [2] => Array ( [RecipientID] => 1 [RecipientScreenname] => Lau T [RecipientFirstname] => TK [RecipientEmail] => lau@xx.co.uk ) ) But I want to