<?php $array = array ( array ( 'Rank' => 422, 'id' => array ( 0 => 152091 ), 'Condition' => array ( 0 => 'Depression', 1 => 'Ketamine' ), 'BriefTitle' => array ( 0 => 'Positron Emission Tomography Assessment of Ketamine Binding of the Serotonin Transporter' ), 'LocationCountry' => array ( 0 => 'Austria' ), 'StartDate' => array ( 0 => 'May 5, 2016' ), 'LastUpdatePostDate' => array ( 0 => 'October 15, 2018' ), 'Entheogen' => 'ketamine', 'Source' => 'clinicaltrials.gov' ), array ( 'Rank' => 6673, 'id' => array ( 0 => 'YSBSZ18291' ), 'Condition' => array ( 0 => 'DepressiveDisorder', 1 => 'Ketamine' ), 'BriefTitle' => array ( 0 => 'Positron Emission Tomography assessment of Ketamine Binding of the Serotonin Transporter and its Relevance for Rapid Antidepressant Response', 1 => 'Die Rolle des Serotonintransporters bei der akuten antidepressiven Wirkung von Ketamin, untersucht mit Positronen-Emissions-Tomographie' ), 'LocationCountry' => array ( 0 => 'Austria' ), 'StartDate' => array ( 0 => '2016 05 01' ), 'LastUpdatePostDate' => array ( 0 => '2018 10 15' ), 'Entheogen' => 'ketamine', 'Source' => 'clinicaltrialsregister.eu' ) ); $result = array(); $brieftitles = array(); foreach ($array as $arr) { $foundtitle = false; $title = $arr['BriefTitle'][0]; foreach ($brieftitles as $btitle) { $foundtitle = (stripos($title, $btitle) !== false) || (stripos($btitle, $title) !== false); if ($foundtitle) break; } if (!$foundtitle) { $result[] = $arr; $brieftitles[] = $arr['BriefTitle'][0]; } } print_r($result);
You have javascript disabled. You will not be able to edit any code.