[linux-programlama] Re: if ile iki koºul

---------

From: Enver ALTIN (ealtin@casdb.com)
Date: Tue 27 May 2003 - 13:27:23 EEST

  • Next message: Devrim GUNDUZ: "[linux-programlama] Fwd :Really simple question about PHP and Apache2 stability. Ready for production usage?"

    On Tue, 2003-05-27 at 13:05, Özgür ÖZASLAN wrote:
    > Merhabalar,
    Merhaba,

    > if ile 2 koşul gerçeklendiğinde bir işlemin yapılmasını nasıl
    > sağlayabilirim. Mesela, ad=ahmet ve soyad=arı olduğunda şu işlemi yap gibi
    > ben araya || koyarak koşul belirtiyorum. Bir örnek kodda görmüştüm:
    > if($ad="ahmet" || $soyad="arı" )
    > gibi. Sanırım || veya anlamına geliyor ve anlamına gelen sembol ne? php
    > manual'da bir örnek bulamadım. Teşekkürler...

    if (($ad=="ahmet") && ($soyad=="arı")) {
            // your code goes here.
    }

    Bir aciklama:

    ($ad="ahmet") ve ($ad=="ahmet") farklidir.

    = operatoru (equal) atamalarda (assignments), == (double equals)
    karsilastirmalarda (comparisons) kullanilir. === (triple equals) PHP'ye
    ozel bir durum ve degiskenlerinin veri tiplerinin de ayni olmasini
    bekler.

    ("123"==123)=TRUE iken, ("123"===123)=FALSE olur.

    Iyi calismalar

    -- 
    Enver ALTIN (a.k.a. skyblue)    - Software developer, generic solvent
    http://enver.casdb.com          - mailto: ealtin at casdb dot com
    http://enver.casdb.com/CV.html  - Just me, myself and I.
    The District of Columbia has a law forbidding you to exert pressure on
    a balloon and thereby cause a whistling sound on the streets.
    -- Attached file included as plaintext by Ecartis --
    -- File: signature.asc
    -- Desc: This is a digitally signed message part
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.2.1 (GNU/Linux)
    iD8DBQA+0z2J+0kL/y7BKGERAi3rAJwIHkAJekasni0QDW9su9wOKVyvKQCfUCcp
    sLC884rXRdWQV7WKN+5pED4=
    =Zqzr
    -----END PGP SIGNATURE-----
    

  • Next message: Devrim GUNDUZ: "[linux-programlama] Fwd :Really simple question about PHP and Apache2 stability. Ready for production usage?"

    ---------

    Bu arsiv hypermail 2.1.6 tarafindan uretilmistir.