PHP Math Function : dechex()

The dechex() function is used to convert a decimal number to a hexadecimal number. The syntax is :
 dechex( number );
Example :
<?php

  echo dechex(150) . "<br/>";
  echo dechex(45) . "<br/>";
  echo dechex(15) . "<br/>";

?>
Output :

96
2d
f


Next Topic :