Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.php Subject: Re: Switch question Date: Mon, 13 Jan 2014 15:34:28 +0100 Lines: 43 Message-ID: <52D3F974.3030203@arnowelzel.de> References: <1jvvn9b20ts0y.1vez76z3aca4b.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: individual.net ztHTsbnQcAmgHHnMRwdfBAmhQFk2tQ2Y7QboVy+Xrao5WSUoGr Cancel-Lock: sha1:rVH6C8OsqxYfprQBiqtiVLKbdqM= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: Xref: csiph.com comp.lang.php:12646 Am 12.01.2014 18:18, schrieb Denis McMahon: > On Sun, 12 Jan 2014 11:48:48 -0500, richard wrote: > >> The manual for PHP switch shows no examples on how to use multiple >> values for the same case. >> In liberty basic I would use the following: >> case 1,2,3,4 case "A","B","C" >> >> What is the equivelant in PHP? >> >> I use the following code to acquire a value: >> $value=$_GET['v']; >> switch ($value){ >> case "A"; > > This is fucked up, despite what you may believe ":" is not the same as ";" Nope - unusual - but valid. According to , cite: It's possible to use a semicolon instead of a colon after a case like: -- Arno Welzel http://arnowelzel.de http://de-rec-fahrrad.de