Sorry I forgot to reply, the code above is a function. Just call it with randHEX()
Eg:
echo randHEX();