Re: [PHP] Unix date (even more bazaar)
- From: tedd.sperling@xxxxxxxxx (tedd)
- Date: Sun, 30 Dec 2007 21:06:41 -0500
At 7:07 PM -0600 12/30/07, Richard Lynch wrote:
Spacing and/or control (unprintable) characters could easily be
messing you up.
Use something like:
$l = strlen($input);
for ($i = 0; $i < $l; $i++){
echo "$i: $input[$i] (", ord($input[$i]), ")<br />\n";
}
to see what you're getting.
Richard:
As usual, you are exactly right.
I found that somehow a gremlin had crept in -- I still don't understand how, but it did. So, I stepped through the string similar to what you did and replaced everything that wasn't supposed to be there.
Interesting that making a text file with the string and looking at it via a Hex Editor, I found that the gremlin was a 0A (new line), but when it was on the server, it was two characters ("High" ASCII 194/160) -- very strange.
In any event, I fixed it. I didn't have the time to run down why.
Thanks,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
.
- References:
- Re: [PHP] Unix date (even more bazaar)
- From: tedd
- Re: [PHP] Unix date (even more bazaar)
- From: tedd
- Re: [PHP] Unix date (even more bazaar)
- From: "Richard Lynch"
- Re: [PHP] Unix date (even more bazaar)
- Prev by Date: Re: [PHP] looping through a $_POST variable
- Next by Date: Re: [PHP] looping through a $_POST variable
- Previous by thread: Re: [PHP] Unix date (even more bazaar)
- Next by thread: Re: [PHP] Unix date (even more bazaar)
- Index(es):
Relevant Pages
|