|
Posted by Michael Trausch on 09/27/91 11:42
J.O. Aho wrote:
>
> Would guess you don't access the value in the right way
> Tried
>
> echo $array_name['takesPlace'];
>
> or
>
> echo $array_name[1];
>
>
> If you are using $array_name[takesPlace], you can get a random result.
>
>
>
> //Aho
The 0 value comes from:
$snooze_until = $row['snooze_until'];
if($snooze_until > time())
{
// do something (which doesn't work)
}
// Debugging output
echo "$snooze_until is snooze till time.\n";
print_r($row);
Is there something subtly incorrect in there that I'm missing?
Echoing the row's column directly yields the correct result, *as a
string*. However, I'm doing a numeric comparison on it, which appears
to be failing somehow or another; it appears that PHP is changing the
value to 0 when it performs its implicit conversion. So, what I'm
wondering again -- is this a quirk with a workaround, am I doing
something subtly or blatantly wrong, or is this a bug?
Thanks,
Mike
[Back to original message]
|