foreach($domainCheckResults as $domainCheckResult)
{
switch($domainCheckResult->status)
{
case Transip_DomainService::AVAILABILITY_INYOURACCOUNT:
$result .= "<p style='color:red;'>".$domainCheckResult->domainName."</p>";
break;
case Transip_DomainService::AVAILABILITY_UNAVAILABLE:
$result .= "<p style='color:red;'>".$domainCheckResult->domainName."</p>";
break;
case Transip_DomainService::AVAILABILITY_FREE:
$result .= "<p style='color:#1aff1a;'>".$domainCheckResult->domainName." "."<a href='ticket.php'><img src='img/next.png' alt='house' width='20' height='20' align='right' title='domein aanvragen?'></a>"."</p>";
break;
case Transip_DomainService::AVAILABILITY_NOTFREE:
$result .= "<p style='color:#ff9933;'>".$domainCheckResult->domainName." "."<a href='contactform.php'><img src='img/65.png' alt='house' width='20' height='20' align='right' title='domein laten verhuizen?'></a>"."</p>";
break;
}
}
So I have 4 possible results for domain availability. I have a array with 20 domains and when I get the results I get them in the sorting of my array. But How can I sort is on availability, so the once that are free all at the top and the once that are not free for whatever reason down? What can I use? I used the sort() tag but that won`t help.