|
|
PHP hexdec() - Math Functions
|
Tutorials » Php »
|
Topic |
What is hexdec Function?
How to convert hexadecimal value to binary in PHP?
|
|
Explanation |
|
The "hexdec()" function converts a hexadecimal number to a decimal number.
Syntax:
hexdec(hex_number)
In the above syntax "hex_number" is the hexadecimal number to be converted to decimal number.
Example:
<?php
echo hexdec(a) . "\n";
echo hexdec(f);
?>
Result:
10
15
In the above example the hexadecimal numbers "a", "f" are converted to decimal numbers "10", "15".
|
|
A Note |
Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial.
Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.
|
|
|
|