SORU
16 EKİM 2008, PERŞEMBE


Nasıl 'veya' PHP diye bir anahtarı kullanmak için?

böyle bir şey (PHP zaten) anahtarı bir durumda YA da bir operatör var mı?

.. gibi bir şey

switch ($value) {

case 1 || 2:
echo 'the value is either 1 or 2';
break;

}

CEVAP
16 EKİM 2008, PERŞEMBE


switch ($value)
{
    case 1:
    case 2:
        echo "the value is either 1 or 2.";
    break;
}

Bu "" durum bloğu ve switch deyimi uygulayan çoğu dilde var. ama düşme denir

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • hytchme

    hytchme

    9 Mart 2014
  • MrRandomSong

    MrRandomSong

    29 Kasım 2009
  • sdasmarchives

    sdasmarchive

    2 HAZİRAN 2010