Comparing two dates in PHP -- I can't get them to "equal" each other.
Posted on 2006-10-26
So I have a couple of simple pages. For my example, one page passes the value for date("Ydm")*12 to another page. The other page calculates date("Ydm")*12 as well, and if they match, then it displays something.
It's not meant to be super secure by any means, it's for a simple page that already has headers, so I can't manipulate them (no ob_start didn't work) that I need to jump to.
However, as soon as I perform an operation on the date value, though they look equal when I ECHO, they never come back equal. Is that because dates aren't treated the same as normal strings?
I even tried covnerting to unix time.... Ideas?