Re: [PHP] Converting a string into ASCII and a bit more - newbie

2004-11-15 Thread Alp
Thanks Matthew, Got it going finally. Would you be able to help in my further question? Alp "Matthew Fonda" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > This ought to work: > $string = 'ABCDEFGHIJ'; > $chars = preg_split('//', $string, -1, PREG_SPLIT_NO_EMPTY); > for ($i = 0;

Re: [PHP] Converting a string into ASCII and a bit more - newbie

2004-11-15 Thread Matthew Fonda
This ought to work: On Sun, 2004-11-14 at 22:32, Alp wrote: > Hi, > > My question could have quite stright forward answer or the question itself > might be silly but being a newbie, I'll ask it anyway. > First I am trying to convert each character in a string into their > respective ASCII code

RE: [PHP] Converting a string into ASCII and a bit more - newbie

2004-11-15 Thread Alp Bekisoglu
Hi Klaus, Thanks you very much both for your quick reply and guidance. Yes, it now works as it should. I have a few further questions all related to the subject if you wouldn't mind. One is: how can I do the following (sort of maths) with a secondary string of ascii values i.e. 25203030 with thi

Re: [PHP] Converting a string into ASCII and a bit more - newbie

2004-11-14 Thread Klaus Reimer
Alp wrote: $x=1 while ($x<=strlen($string)) { $holder = ord(substr($string, $x, 1)); $result = $result . $holder; } and failed since it takes ages to process and does not really return a proper value/result but repetitive number such as 1.. I think you forgot to increment $x