How do I convert a character to ascii code in php?

Discussion in 'PHP' started by chengcj, May 9, 2006.

  1. #1
    How do I convert a character to ascii code in php?
     
    chengcj, May 9, 2006 IP
  2. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You're after the 'ord' function. From the help file:


    int ord ( string string )

    Returns the ASCII value of the first character of string. This function complements chr().


    Hope this helps...
     
    TwistMyArm, May 9, 2006 IP