You are here: Re: Some strings are not true ? « PHP Programming Language « IT news, forums, messages
Re: Some strings are not true ?

Posted by groups2 on 12/31/07 18:52

On Dec 31, 1:24 pm, Iván Sánchez Ortega <ivansanchez-...@rroba-
escomposlinux.-.punto.-.org> wrote:
> grou...@reenie.org wrote:
> > This is true: "2-3"==1
>
> > But "1-2"==1 is not true
>
> > Why ?
>
> RTFM on type juggling. You may not be doing a comparison between integers or
> between strings. Force type casting where appropiate.
>
> --
> ----------------------------------
> Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-
>
> MSN:i_eat_s_p_a_m_for_breakf...@hotmail.com
> Jabber:ivansanc...@jabber.org ; ivansanc...@kdetalk.net

Yes, I read that already. I know how to make it consistent with type
casting, but that is not my question.

In both cases, it is a comparison between a string and an integer.

The Manual says:
If the string starts with valid numeric data, this will be the value
used. Otherwise, the value will be 0 (zero).

Bot strings start with valid numeric data, so I still want to know why
one is true and the other is not.

 

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

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