server {
server_name www.example.com;
return 301 http://example.com$request_uri;
}
$currencies.$secondary_currency
uasort(
$array,
function ($item1, $item2) {
if (!isset($item1['count']) && !isset($item2['count'])) {
return 0;
}
if (!isset($item1['count'])) {
return 1;
}
if (!isset($item2['count'])) {
return -1;
}
if ($item1['count'] == $item2['count']) {
return 1;
}
return $item1['count'] - $item2['count'];
}
);
if ($item1['count'] == $item2['count']) {
return 1;
}
function helpCompare($a, $b)
{
$count1 = $a->count;
$count2 = $b->count;
if(!$count1 && !$count2) {
return 0;
}
else if(!$count1) {
return 1;
}
else if(!$count2) {
return 0;
}
else if($count1 > $count2) {
return 1;
}
else {
return 0;
}
}
usort($terms_array[0], "helpCompare");