private function removeFromCookie($all, $cookie, $newSort) { foreach ($cookie as $key => $c) { if ($c['orderBy'] == $newSort['orderBy'] && $c['relationship'] == $newSort['relationship']) { unset($cookie[$key]); return $cookie; } } return $cookie; }