You are here: Re: Is this a quirk, or a bug, or am I just retarded somehow? « All PHP « IT news, forums, messages
Re: Is this a quirk, or a bug, or am I just retarded somehow?

Posted by Michael Trausch on 09/28/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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация