Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #12617

Re: Switch question

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Date Sun, 12 Jan 2014 18:21:38 +0100
From Luuk <luuk@invalid.lan>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
MIME-Version 1.0
Newsgroups comp.lang.php
Subject Re: Switch question
References <1jvvn9b20ts0y.1vez76z3aca4b.dlg@40tude.net>
In-Reply-To <1jvvn9b20ts0y.1vez76z3aca4b.dlg@40tude.net>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Message-ID <3ivaqa-rhg.ln1@luuk.invalid.lan> (permalink)
Lines 23
NNTP-Posting-Host 2001:980:9089:1:e413:fe0e:9153:32a1
X-Trace 1389547501 news.xs4all.nl 2846 [2001:980:9089:1:e413:fe0e:9153:32a1]:36956
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.php:12617

Show key headers only | View raw


On 12-01-2014 17:48, richard wrote:
> The manual for PHP switch shows no examples on how to use multiple values
> for the same case.

I think this is a pretty neat example:
<?php
switch ($i) {
case 0:
case 1:
case 2:
     echo "i is less than 3 but not negative";
     break;
case 3:
     echo "i is 3";
}
?>
found on this page:
http://www.php.net/manual/en/control-structures.switch.php

> In liberty basic I would use the following:

this should be about PHP, not about liberty, or about basic....

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Switch question richard <noreply@example.com> - 2014-01-12 11:48 -0500
  Re: Switch question Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-12 17:18 +0000
    Re: Switch question richard <noreply@example.com> - 2014-01-12 12:26 -0500
      Re: Switch question Luuk <luuk@invalid.lan> - 2014-01-12 18:44 +0100
      Re: Switch question Evan Platt <evan@theobvious.espphotography.com.invalid> - 2014-01-12 10:47 -0800
        Re: Switch question Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-12 23:15 +0000
      Re: Switch question Norman Peelman <npeelman@cfl.rr.com> - 2014-01-12 16:07 -0500
        Re: Switch question Norman Peelman <npeelman@cfl.rr.com> - 2014-01-12 23:01 -0500
          Re: Switch question Norman Peelman <npeelman@cfl.rr.com> - 2014-01-12 23:10 -0500
            Re: Switch question Norman Peelman <npeelman@cfl.rr.com> - 2014-01-13 06:53 -0500
            Re: Switch question Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-13 13:11 +0000
      Re: Switch question Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-12 23:14 +0000
      Re: Switch question Doug Miller <doug_at_milmac_dot_com@example.com> - 2014-01-13 01:40 +0000
        Re: Switch question The Natural Philosopher <tnp@invalid.invalid> - 2014-01-13 01:54 +0000
          Re: Switch question Doug Miller <doug_at_milmac_dot_com@example.com> - 2014-01-13 03:19 +0000
    Re: Switch question Arno Welzel <usenet@arnowelzel.de> - 2014-01-13 15:34 +0100
  Re: Switch question Denis McMahon <denismfmcmahon@gmail.com> - 2014-01-12 17:22 +0000
    Re: Switch question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-01-12 23:36 +0100
  Re: Switch question Luuk <luuk@invalid.lan> - 2014-01-12 18:21 +0100
  Re: Switch question "Beauregard T. Shagnasty" <a.nony.mous@example.invalid> - 2014-01-12 17:34 +0000
  Re: Switch question Arno Welzel <usenet@arnowelzel.de> - 2014-01-13 15:32 +0100

csiph-web