<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Multiple cases for switch construct</title>
	<atom:link href="http://www.nutt.net/2004/12/28/multiple-cases-for-switch-construct/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nutt.net/2004/12/28/multiple-cases-for-switch-construct/</link>
	<description>Random articles on whatever I feel like...</description>
	<lastBuildDate>Thu, 29 Jul 2010 11:00:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Thierry</title>
		<link>http://www.nutt.net/2004/12/28/multiple-cases-for-switch-construct/comment-page-1/#comment-83939</link>
		<dc:creator>Thierry</dc:creator>
		<pubDate>Wed, 01 Jul 2009 06:34:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nutt.net/archive/2004/12/28/multiple-cases-for-switch-construct/55.html#comment-83939</guid>
		<description>After working around with the same question, I think I give some kind of explanations, a little different from the provious ones.

switch doesn&#039;t act differently with strings.

This work fine:

		case &quot;A&quot;:
		case &quot;B&quot;:
		case &quot;C&quot;:
		case &quot;D&quot;:
			$L = &quot;ABCD&quot;;
			break;
			
		case &quot;E&quot;:
		case &quot;F&quot;:
		case &quot;G&quot;:
		case &quot;H&quot;:
			$L = &quot;EFGH&quot;;
			break;</description>
		<content:encoded><![CDATA[<p>After working around with the same question, I think I give some kind of explanations, a little different from the provious ones.</p>
<p>switch doesn&#8217;t act differently with strings.</p>
<p>This work fine:</p>
<p>		case &#8220;A&#8221;:<br />
		case &#8220;B&#8221;:<br />
		case &#8220;C&#8221;:<br />
		case &#8220;D&#8221;:<br />
			$L = &#8220;ABCD&#8221;;<br />
			break;</p>
<p>		case &#8220;E&#8221;:<br />
		case &#8220;F&#8221;:<br />
		case &#8220;G&#8221;:<br />
		case &#8220;H&#8221;:<br />
			$L = &#8220;EFGH&#8221;;<br />
			break;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.nutt.net/2004/12/28/multiple-cases-for-switch-construct/comment-page-1/#comment-10826</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Sat, 17 Mar 2007 11:53:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nutt.net/archive/2004/12/28/multiple-cases-for-switch-construct/55.html#comment-10826</guid>
		<description>The OR construct seems to work for me, but the range doesn&#039;t.</description>
		<content:encoded><![CDATA[<p>The OR construct seems to work for me, but the range doesn&#8217;t.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruno</title>
		<link>http://www.nutt.net/2004/12/28/multiple-cases-for-switch-construct/comment-page-1/#comment-10814</link>
		<dc:creator>Bruno</dc:creator>
		<pubDate>Sat, 17 Mar 2007 07:30:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nutt.net/archive/2004/12/28/multiple-cases-for-switch-construct/55.html#comment-10814</guid>
		<description>I&#039;ve discovered the syntax which makes the multiple-construct work:

You simply omit the parenthesis, so that the case line reads eg:

case 1 &#124;&#124; 2:
  echo &quot;foobar&quot;;

and so on.

It seems that the range allows something like this:

case 1-3:
  echo &quot;foobar&quot;;</description>
		<content:encoded><![CDATA[<p>I&#8217;ve discovered the syntax which makes the multiple-construct work:</p>
<p>You simply omit the parenthesis, so that the case line reads eg:</p>
<p>case 1 || 2:<br />
  echo &#8220;foobar&#8221;;</p>
<p>and so on.</p>
<p>It seems that the range allows something like this:</p>
<p>case 1-3:<br />
  echo &#8220;foobar&#8221;;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
