note 70575 added to function.getmxrr

From: Date: Fri, 20 Oct 2006 19:50:02 +0000
Subject: note 70575 added to function.getmxrr
Groups: php.notes 
Request: Send a blank email to php-notes+get-118868@lists.php.net to get a copy of this message
Leonardt's code fails with multiple mx records with the same wight. You can easily change this by switching keys and values in the mxs array: for($i=0;$i<count($mx_records);$i++){ $mxs[$mx_records[$i]] = $mx_weight[$i]; } arsort ($mxs ); reset ($mxs); while (list ($mx_host, $mx_weight) = each ($mxs) ) { cheers Tom ---- Server IP: 212.124.37.9 Probable Submitter: 85.176.4.228 ---- Manual Page -- http://www.php.net/manual/en/function.getmxrr.php Edit -- https://master.php.net/note/edit/70575 Del: integrated -- https://master.php.net/note/delete/70575/integrated Del: useless -- https://master.php.net/note/delete/70575/useless Del: bad code -- https://master.php.net/note/delete/70575/bad+code Del: spam -- https://master.php.net/note/delete/70575/spam Del: non-english -- https://master.php.net/note/delete/70575/non-english Del: in docs -- https://master.php.net/note/delete/70575/in+docs Del: other reasons-- https://master.php.net/note/delete/70575 Reject -- https://master.php.net/note/reject/70575 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#118868) next »