string to int (ASCII) conversion problem
Posted: Wed Dec 01, 2010 8:22 am
Hi,
I am new to php. I am facing an algorithm problem where I have a string consisting of numbers like 097110107.... and this string needs to be broken in groups of 3 digits each such that 097110107 = [097] [110] [107] The length of string is a multiple of 3 of-course for equal length sub-groups and then each sub-group needs to be converted to the ASCII equivalent character like [097] [110] [107] = 'ank' and of-course all sub-groups will be less than 256 value as integer of 3 digits.
How do I do all this in php?
--
Thanks,
Ankit
I am new to php. I am facing an algorithm problem where I have a string consisting of numbers like 097110107.... and this string needs to be broken in groups of 3 digits each such that 097110107 = [097] [110] [107] The length of string is a multiple of 3 of-course for equal length sub-groups and then each sub-group needs to be converted to the ASCII equivalent character like [097] [110] [107] = 'ank' and of-course all sub-groups will be less than 256 value as integer of 3 digits.
How do I do all this in php?
--
Thanks,
Ankit