PHP hexdec() function
Complete PHP Math Reference
Definition and Usage
The hexdec() function converts a hexadecimal number to a decimal number.
Syntax
Parameter |
Description |
hex_number |
Required. Specifies the hexadecimal number to convert |
Example
<?php
echo hexdec("1e") . "<br />";
echo hexdec("a") . "<br />";
echo hexdec("11ff") . "<br />";
echo hexdec("cceeff");
?>
|
The output of the code above will be:
Complete PHP Math Reference
|