Click to See Complete Forum and Search --> : Int to hex string


cridley
10-05-2006, 11:38 AM
Hi all, a quick question....
I'm trying to convert an int , say 4095 into a string representation of its value in hexadecimal, in 4095's case, "FFF".
This is for a weird project I'm working on for a basic color picker control.

Hope that makes sense,

Cheers.

chazzy
10-05-2006, 11:57 AM
i'm inclined to say you want dechex()

http://us3.php.net/manual/en/function.dechex.php

cridley
10-06-2006, 03:44 AM
yup, that'll do it, cheers..