Connecting Tech Pros Worldwide Help | Site Map

convert integers to hex

  #1  
Old December 23rd, 2005, 12:35 PM
somaboy mx
Guest
 
Posts: n/a
Is there a built-in PHP function that lets you convert integers to
hexadecimal values?
For example 255 to FF.

Couldn't find any in the manual.

..soma


  #2  
Old December 23rd, 2005, 12:35 PM
Ewoud Dronkert
Guest
 
Posts: n/a

re: convert integers to hex


somaboy mx wrote:[color=blue]
> Is there a built-in PHP function that lets you convert integers to
> hexadecimal values? [...] Couldn't find any in the manual.[/color]

couldn't find? How is that possible?
http://www.google.com/search?q=hexad...te:www.php.net

--
E. Dronkert
  #3  
Old December 23rd, 2005, 12:55 PM
Kimmo Laine
Guest
 
Posts: n/a

re: convert integers to hex


"somaboy mx" <nosuch@fakemail.fk> wrote in message
news:dogh7t$67r$1@domitilla.aioe.org...[color=blue]
> Is there a built-in PHP function that lets you convert integers to
> hexadecimal values?
> For example 255 to FF.[/color]

Yes there is, dechex().
[color=blue]
> Couldn't find any in the manual.[/color]

Have you ever seen a movie called Barry Lyndon? There's this beautiful scene
right in the beginning, this is how the dialogue goes:

Nora: "I have hidden my neck ribbon somewhere on my person. If you find it,
you can have it. You are free to look anywhere for it. I will think little
of you if you do not find it."
Barry: "I cannot find it."
- "You haven't looked properly."
- "I cannot find it."
- "I'll give you a hint."
- "I feel the ribbon."
- "Why are you trembling?"
- "At the pleasure of finding the ribbon."
- "Liar."

Nora hid the ribbon between her breasts. Barry looked for it only from her
hands, failing to find it. as Nora says "I'll give you a hint", she takes
Barry's hand to here bosom, and Barry eventually finds the ribbon.

In a way, you resemble Barry, who was so reluctant to look for the answer
while it was practically right under his nose. Was it courtesy, shyness or
plain stupidity? We shall never know. If you get a chance to watch Barry
Lyndon, I recommend you to do so, it is a masterpiece by Stanley Kubrick.

--
"En ole paha ihminen, mutta omenat ovat elinkeinoni." -Perttu Sirviö
antaatulla.sikanautaa@gmail.com.NOSPAM.invalid


  #4  
Old December 23rd, 2005, 02:15 PM
Erwin Moller
Guest
 
Posts: n/a

re: convert integers to hex


Kimmo Laine wrote:
[color=blue]
> "somaboy mx" <nosuch@fakemail.fk> wrote in message
> news:dogh7t$67r$1@domitilla.aioe.org...[color=green]
>> Is there a built-in PHP function that lets you convert integers to
>> hexadecimal values?
>> For example 255 to FF.[/color]
>
> Yes there is, dechex().
>[color=green]
>> Couldn't find any in the manual.[/color]
>
> Have you ever seen a movie called Barry Lyndon? There's this beautiful
> scene right in the beginning, this is how the dialogue goes:
>
> Nora: "I have hidden my neck ribbon somewhere on my person. If you find
> it, you can have it. You are free to look anywhere for it. I will think
> little of you if you do not find it."
> Barry: "I cannot find it."
> - "You haven't looked properly."
> - "I cannot find it."
> - "I'll give you a hint."
> - "I feel the ribbon."
> - "Why are you trembling?"
> - "At the pleasure of finding the ribbon."
> - "Liar."
>
> Nora hid the ribbon between her breasts. Barry looked for it only from her
> hands, failing to find it. as Nora says "I'll give you a hint", she takes
> Barry's hand to here bosom, and Barry eventually finds the ribbon.
>
> In a way, you resemble Barry, who was so reluctant to look for the answer
> while it was practically right under his nose. Was it courtesy, shyness or
> plain stupidity? We shall never know. If you get a chance to watch Barry
> Lyndon, I recommend you to do so, it is a masterpiece by Stanley Kubrick.
>[/color]

LOL. :-)

Kimmo, that is the funniest version of the famous RTFM I ever saw. :-)

Erwin Moller
  #5  
Old December 23rd, 2005, 04:05 PM
Kimmo Laine
Guest
 
Posts: n/a

re: convert integers to hex


"Erwin Moller"
<since_humans_read_this_I_am_spammed_too_much@spam yourself.com> kirjoitti
viestissä:43ac035e$0$11065$e4fe514c@news.xs4all.nl ...[color=blue]
> Kimmo Laine wrote:
>[color=green]
>> "somaboy mx" <nosuch@fakemail.fk> wrote in message
>> news:dogh7t$67r$1@domitilla.aioe.org...[color=darkred]
>>> Is there a built-in PHP function that lets you convert integers to
>>> hexadecimal values?
>>> For example 255 to FF.[/color]
>>
>> Yes there is, dechex().
>>[color=darkred]
>>> Couldn't find any in the manual.[/color]
>>
>> Have you ever seen a movie called Barry Lyndon? There's this beautiful
>> scene right in the beginning, this is how the dialogue goes:
>>
>> Nora: "I have hidden my neck ribbon somewhere on my person. If you find
>> it, you can have it. You are free to look anywhere for it. I will think
>> little of you if you do not find it."
>> Barry: "I cannot find it."
>> - "You haven't looked properly."
>> - "I cannot find it."
>> - "I'll give you a hint."
>> - "I feel the ribbon."
>> - "Why are you trembling?"
>> - "At the pleasure of finding the ribbon."
>> - "Liar."
>>
>> Nora hid the ribbon between her breasts. Barry looked for it only from
>> her
>> hands, failing to find it. as Nora says "I'll give you a hint", she takes
>> Barry's hand to here bosom, and Barry eventually finds the ribbon.
>>
>> In a way, you resemble Barry, who was so reluctant to look for the answer
>> while it was practically right under his nose. Was it courtesy, shyness
>> or
>> plain stupidity? We shall never know. If you get a chance to watch Barry
>> Lyndon, I recommend you to do so, it is a masterpiece by Stanley Kubrick.
>>[/color]
>
> LOL. :-)
>
> Kimmo, that is the funniest version of the famous RTFM I ever saw. :-)
>[/color]


RTFM is just so impersonal... :)


--
SETI @ Home - Donate your cpu's idle time to science.
Further reading at <http://setiweb.ssl.berkeley.edu/>
Kimmo Laine <antaatulla.sikanautaa@gmail.com.NOSPAM.invalid>


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
BCD List to HEX List Philippe Martin answers 67 August 3rd, 2006 09:45 AM
ASCII to HEX Tyler Kellen answers 3 November 14th, 2005 03:02 PM
how to convert very large number to hex string oddstray answers 4 November 14th, 2005 12:46 PM
How to convert a number to hex number? Hako answers 13 November 10th, 2005 02:25 AM