Re: STRING TO ASCII CHARACTERS
| From: | cajbecu | Date: | Fri, 23 Jun 2006 10:35:46 +0000 |
| Subject: | Re: STRING TO ASCII CHARACTERS | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-238550@lists.php.net to get a copy of this message | ||
That`s true, my mistake.. (length is in pascal)
cheers,
Juanjo Pascual wrote:
> Ok. Thanks.
>
> You only have to change the function *length() *by the function *strlen()*
>
>
> cajbecu escribió:
>> function stransform($string) {
>> for ($i=0;$i<length($string);$i++) {
>> $data .= "&#".ord(substr($string,$i,1)).";";
>> }
>> return $data;
>> }
>>
>>
>> Juanjo Pascual wrote:
>>
>>> Do you know any way to convert any string to ascii characters??
>>>
>>> I mean:
>>>
>>>
>>> *"abcdefgh"*
>>>
>>> to
>>>
>>>
>>> *"abcdefgh"*
>>>
>>>
>>> Juanjo.
>>>
>>>
>>
>>
>>