Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old December 23rd, 2005, 12:35 PM
somaboy mx
Guest
 
Posts: n/a
Default convert integers to hex

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
Default 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
Default 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
Default 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
Default 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>


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles