Solved

Need to convert Denary to Hex

Posted on 2006-11-28
6
299 Views
Last Modified: 2012-06-27
Need to convert normal denary to hex.


ie turn 255 into FF

Tony
0
Comment
Question by:tonelm54
  • 4
  • 2
6 Comments
 
LVL 54

Accepted Solution

by:
b0lsc0tt earned 500 total points
ID: 18032572
tonelm54,

Use the dechex function.  For example ...

echo dechex(255);

Will give you FF.

Let me know if you have any questions or need more information.

b0lsc0tt
0
 
LVL 6

Expert Comment

by:aescnt
ID: 18034724
By the way, do you mean "decimal" instead of "denary"? :)
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 18038389
My comment assumes that it was a typo and you meant decimal.

bol
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 6

Expert Comment

by:aescnt
ID: 18039925
Hehe, I meant to ask that to the asker. :) I thought decimal, too.
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 18040629
@Aescnt - I realized that, especially since I didn't use "denary."  Your comment made me realize that I should note the "correction" I made.  My post was a notice to Tonelm54 just in case I was wrong about the typo.

bol
0
 
LVL 54

Expert Comment

by:b0lsc0tt
ID: 18069929
I'm glad that I could help you.  Thank you for the grade, the points and the fun question.

bol
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question