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

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


  • 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


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

Howdy, Stranger!

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