note 106797 added to function.hexdec
| From: | programacion at mundosica dot com | Date: | Wed, 07 Dec 2011 05:50:47 +0000 |
| Subject: | note 106797 added to function.hexdec | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-184966@lists.php.net to get a copy of this message | ||
Here is other function to transform a MAC Address to decimal:
<?php
function get_mac_decimal($mac) {
$clear_mac = preg_replace('/[^0-9A-F]/i','',$mac);
$mac_decimal = array();
for ($i = 0; $i < strlen($clear_mac); $i += 2 ):
$mac_decimal[] = hexdec(substr($clear_mac, $i, 2));
endfor;
return implode('.',$mac_decimal);
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 200.76.90.173
----
Manual Page -- http://www.php.net/manual/en/function.hexdec.php
Edit -- https://master.php.net/note/edit/106797
Del: integrated -- https://master.php.net/note/delete/106797/integrated
Del: useless -- https://master.php.net/note/delete/106797/useless
Del: bad code -- https://master.php.net/note/delete/106797/bad+code
Del: spam -- https://master.php.net/note/delete/106797/spam
Del: non-english -- https://master.php.net/note/delete/106797/non-english
Del: in docs -- https://master.php.net/note/delete/106797/in+docs
Del: other reasons-- https://master.php.net/note/delete/106797
Reject -- https://master.php.net/note/reject/106797
Search -- https://master.php.net/manage/user-notes.php