PHP hexdec() Function Example

PHP hexdec() Function Example


Posted in : PHP Posted on : January 28, 2011 at 5:49 PM Comments : [ 0 ]

If you want to convert hexadecimal number to decimal number then use hexdec() function for this.

PHP hexdec() Function Example:

If you want to convert hexadecimal number to decimal number then use hexdec() function for this. This is the easy way to convert hexadecimal number to decimal number.

Syntax:

hexdec(hexadecemal_number)

Example:

<?php
// hexa decimal to decimal conversion with the help of hexdec() function

echo hexdec("1eda") . "<br />";
echo hexdec("abcdef") . "<br />";
echo hexdec("A11") . "<br />";
?> 

Output:

The output is:

7898
11259375
2577

Download Example Code

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics