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

Howdy, Stranger!

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

Categories

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

cmario00cmario00 Posts: 12Member
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]

Comments

  • SouldrinkerSouldrinker Posts: 143Member
    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
    net::allies

    www.net-allies.de
    [email protected]

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