Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


hi, how the heck do i convert a string into its equivalent ascII num

cmario00cmario00 Member Posts: 12
I need to convert a characters into ascII numbers in order to do some simple caesar shifting (just for testing purposes obviously). Can someone tell me how to do this? Thank you.

Mario Aguilera
[email protected]


  • SouldrinkerSouldrinker Member Posts: 143
    First of all: stay cool! :-)

    And now, here is the function to return the ascII Value of some char:

    int ord ( char char )

    you could use the function something like this:

    $my_val = ord ( " " );

    "$my_val" would now contain the value "32".

    have a nice day!

    best regards,

    sebastian mohrenstecher
    executive secretary
    [email protected]

  • cmario00cmario00 Member Posts: 12
    i knew there had to be a function for that, couldn't find it anywhere though. Thanks
Sign In or Register to comment.