Return to Snippet

Revision: 68309
at December 30, 2014 01:15 by a1ias


Updated Code
foreach ($tmp as $k => $v) {
	if (strpos(serialize($result),$v['id']) === FALSE) {
		$result[] = $v;
	}
}

Revision: 68308
at December 30, 2014 01:04 by a1ias


Initial Code
foreach ($tmp as $k => $v) {
			if (strpos(serialize($result),$v['id']) === FALSE) {
				$result[] = $v;
			}
		}

Initial URL

                                

Initial Description
Works with any array

Initial Title
Remove duplicates from multi-dimensional array 2

Initial Tags
php, array

Initial Language
PHP