byte datatype in php?

Discussion in 'PHP' started by benjib98, Jan 11, 2008.

  1. #1
    Hi,
    How can I convert a string/character into a byte in PHP?Is there a way to do it?
    Is there actually a byte data type in php?
     
    benjib98, Jan 11, 2008 IP
  2. Gordaen

    Gordaen Peon

    Messages:
    277
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    There is no actual byte data type in PHP.
     
    Gordaen, Jan 11, 2008 IP
  3. Kwaku

    Kwaku Well-Known Member

    Messages:
    1,217
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    140
    #3
    I think you are looking for ord(...) ;

    echo ord('A');
     
    Kwaku, Jan 12, 2008 IP