Suppose the array is called $my_array;
$new_array = array();
// 1. Loop out all the rows. ($val is a certain row)
foreach($my_array as $k => $val){
$hash = md5(json_encode($val));
if (in_array($hash, $tmp_array)) {
echo('This line already exists');
}else {
// 2. In the body of the foreach loop, assign the hash of each row of array object to the temporary array.
$tmp_array[] = $hash;
$new_array[] = $ val;
}
}
print_r($new_array);