sorting
Posted: Mon Nov 08, 2004 8:08 am
i have two arrays which i merge
1.
array_push($domain_array,"j".$primary_id . "p?" . "<strong>". $dp_hostname. "</strong>" . "?" . $dp_next_renewal);
2.
array_push($domain_array,"k".$secondary_id . "s?" .$ds_hostname . "?" . $ds_next_renewal);
the $dp_hostname and $ds_hostname are domain name strings, for example like
http://www.msn.com
http://www.msn.co.uk
etc
I want to be able to sort the array by the .com, co.uk, .net etc in ascending order. how can i do this?
or alternatively can i do it in the query
select * from tbl_domains order by ???????
thanks for any help
1.
array_push($domain_array,"j".$primary_id . "p?" . "<strong>". $dp_hostname. "</strong>" . "?" . $dp_next_renewal);
2.
array_push($domain_array,"k".$secondary_id . "s?" .$ds_hostname . "?" . $ds_next_renewal);
the $dp_hostname and $ds_hostname are domain name strings, for example like
http://www.msn.com
http://www.msn.co.uk
etc
I want to be able to sort the array by the .com, co.uk, .net etc in ascending order. how can i do this?
or alternatively can i do it in the query
select * from tbl_domains order by ???????
thanks for any help