I am reading and manipulating data from a series of text files. I noticed that my function for trying to break up some of the data by a space doesn't always work.
For instance I have
MOST_RECENT_RESULT 100
as part of my text file. I have been using
$pos = strrpos($string, ' ')
and echoing out where the last space from the right is to check it is working ok. This works for most of the files. But some have blank positions returned, which I found odd. So I copied the string from my browser and directly ran it in a script and it then returned the correct position. Which leads me to believe that there is some kind of whitespace code or something i'm missing here when accessing the files, I have tried \r
\v
\n
to no avail. How do I find out exactly what character is in the string. If that is indeed the actual problem?