Re: STRING TO ASCII CHARACTERS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
>>>
>>> *"&#97;&#98;&#99;&#100;&#101;&#102;&#103;&#104"*
>>>
>>>
>>> Juanjo.
>>>
>>>     
>>
>>
>>   

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux