Hi people.

I need a function or technique to return the ascii code of a character. This is because i keep getting loads of non-printable crap out of a MySQL database, which screws up code like this:

if  ( $my_str == "") {
....

in order to debug this problem, it would be usefull if i could get the ascii code of these 'junk' characters. I think the characters could be nulls, but using the is_null() function doesn't seem to work either?

Thanks
Robin

    Try the ord() function... It will take in a character and retrun its ascii value...

    PHPdev

      Write a Reply...