PHP Math Function : hexdec()

The hexdec() function is used to convert a hexadecimal number to a decimal number. The syntax is :
 hexdec( hex_string);
Where hex_string specifies the hexadecimal string to convert.

Example :
<?php

  echo hexdec("32") . "<br/>";
  echo hexdec("9B") . "<br/>";
  echo hexdec("ff") . "<br/>";

?>
Output :

50
155
255


Next Topic :