PHP: Simple question

PHP: Simple question

am 13.11.2007 16:15:15 von Shelly

In C and other languages I have had the need to convert from a character to
an integer. This is easy. Now, however, this is the first time I have had
to do this in PHP and I can't find the proper function. The reason I need
this is that upon downgrading to MySQL 4.0.7 (upon changing servers), data
that are in the tables contain characters that are not translated properly.
These characters are (at least two of them are) â and ?. I want to decode
part of the string to its integer representation to see how I can handle
this problem. Interestingly, the character T translates properly. The
actual sequence (or one of them) is â?T

I would love to avoid the necessity of fixing all those strings in the
database.

--
Shelly

PS: I included the PHP prefix label for the filtering challenged :-)

Re: PHP: Simple question

am 13.11.2007 16:34:32 von colin.mckinnon

On 13 Nov, 15:15, "Shelly" wrote:
> In C and other languages I have had the need to convert from a character to
> an integer.

try ord()

C.

Re: PHP: Simple question

am 13.11.2007 17:04:56 von Shelly

C. (http://symcbean.blogspot.com/) wrote:
> On 13 Nov, 15:15, "Shelly" wrote:
>> In C and other languages I have had the need to convert from a
>> character to an integer.
>
> try ord()
>
> C.

Thanks, that worked. I knew it had to be simple.

--
Shelly