Convert Hexadecimal to decimal in PHP- The hexdec()
function returns the decimal equivalent of the hexadecimal number represented by the string type argument. hexdec()
converts a hexadecimal string to a decimal number.
Code to Convert hexadecimal to decimal in PHP-
$hexadecimal = 'afc758';
$decimal = hexdec($hexadecimal);
echo $hexadecimal . ' -> decimal value is: ' . $decimal;