You are here: Re: [PHP] alternative to empty « PHP « IT news, forums, messages
Re: [PHP] alternative to empty

Posted by Andrι Medeiros on 07/06/05 15:47

On Wed, 2005-07-06 at 13:20 +0200, Angelo Zanetti wrote:
> what about checking that the length is >0
>

Checking if length > 0 requires calling a function, wich takes longer
(it's a ridiculous difference, but still...)

> but i think the other suggestions are fine.
>
> AndrΓ© Medeiros wrote:
>
> >On Wed, 2005-07-06 at 10:55 +0100, Ross wrote:
> >
> >
> >>I have been using empty in forms for some time now. but have just discovered
> >>that
> >>
> >> PHP 4 As of PHP 4, The string value "0" is considered empty.
> >>
> >>
> >>
> >>
> >>Is there an alternative that will just check for empty strings. I suppose I
> >>could just use eregi and check for numbers but thought there may be a
> >>function that would work in a similar way.
> >>
> >>
> >>R.
> >>
> >>
> >>
> >
> >If a string is empty, it should be == ''
> >
> >
> >
>

 

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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация