<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.5" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments for Articles Repository</title>
	<link>http://fastcreators.com/article</link>
	<description>FastCreators Articles Repository</description>
	<pubDate>Sun, 06 Jul 2008 12:23:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.5</generator>

	<item>
		<title>Comment on Loops in PHP by Jehzeel Laurente</title>
		<link>http://fastcreators.com/article/2007/01/20/loops-in-php/#comment-319</link>
		<pubDate>Tue, 06 Mar 2007 04:21:21 +0000</pubDate>
		<guid>http://fastcreators.com/article/2007/01/20/loops-in-php/#comment-319</guid>
					<description>this tutorial is really helpful... I learned a lot from it.. ^__^ I have to do the assignment also if i'm not busy. .weeeeee!! thanks haroon ^_^</description>
		<content:encoded><![CDATA[<p>this tutorial is really helpful&#8230; I learned a lot from it.. ^__^ I have to do the assignment also if i&#8217;m not busy. .weeeeee!! thanks haroon ^_^
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Decision Making using PHP Switch Statement by haroon.ahmad</title>
		<link>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-255</link>
		<pubDate>Sun, 25 Feb 2007 18:32:12 +0000</pubDate>
		<guid>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-255</guid>
					<description>Hi Mike, 

You didnt provide any code. anyway, you can simply use $_GET global array to access the variables from your URL similalry use $_POST for post array. also you can just use 1 / true in the switch parenthesis like 

switch(1) { 

//use $_GET here to access your three vars
}

hope it will help</description>
		<content:encoded><![CDATA[<p>Hi Mike, </p>
<p>You didnt provide any code. anyway, you can simply use $_GET global array to access the variables from your URL similalry use $_POST for post array. also you can just use 1 / true in the switch parenthesis like </p>
<p>switch(1) { </p>
<p>//use $_GET here to access your three vars<br />
}</p>
<p>hope it will help
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Decision Making using PHP Switch Statement by Mike_G</title>
		<link>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-254</link>
		<pubDate>Sun, 25 Feb 2007 17:01:10 +0000</pubDate>
		<guid>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-254</guid>
					<description>Hi - I'm trying to pass more than one piece of information (3  total)  from a menu button to a php switch/case, and I'm not sure of the syntax . I'm passing the $page, $current, and $sub.

My button link is: &lt;a href="?page=results&#38;current=two&#38;sub=b" rel="nofollow"&gt;

There is no path, since this would all happen on the index page.

The switch/case to catch this information is:

</description>
		<content:encoded><![CDATA[<p>Hi - I&#8217;m trying to pass more than one piece of information (3  total)  from a menu button to a php switch/case, and I&#8217;m not sure of the syntax . I&#8217;m passing the $page, $current, and $sub.</p>
<p>My button link is: <a href="?page=results&amp;current=two&amp;sub=b" rel="nofollow"></p>
<p>There is no path, since this would all happen on the index page.</p>
<p>The switch/case to catch this information is:
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Decision Making using PHP Switch Statement by Jehzeel Laurente</title>
		<link>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-225</link>
		<pubDate>Thu, 22 Feb 2007 04:37:20 +0000</pubDate>
		<guid>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-225</guid>
					<description>hey!!! i have finished the assignment.. you're tutorial is very very nice indeed and i'm learning a lot! ^__^

by the way, it's not Jahzeel but Jehzeel ^__^

w8 i'll send my finished code to your email for comments so that I'll learn more and more from you ^__^

weeeeeeeee!!!</description>
		<content:encoded><![CDATA[<p>hey!!! i have finished the assignment.. you&#8217;re tutorial is very very nice indeed and i&#8217;m learning a lot! ^__^</p>
<p>by the way, it&#8217;s not Jahzeel but Jehzeel ^__^</p>
<p>w8 i&#8217;ll send my finished code to your email for comments so that I&#8217;ll learn more and more from you ^__^</p>
<p>weeeeeeeee!!!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Decision Making using PHP Switch Statement by haroon.ahmad</title>
		<link>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-224</link>
		<pubDate>Thu, 22 Feb 2007 04:21:33 +0000</pubDate>
		<guid>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-224</guid>
					<description>Hi Jahzeel

Yeah, for now the MySQL database is prohibited because I am writing these articles in a series and I am going from scratch to super expert level step by step. For now you should do this assignment without MySQL however if you already have worked in MySQL then go ahead and give it a try. I will soon start PHP-MySQL portion and after that PHP-XML, PHP-Flatfiles (text files), PHP-cURL, PHP-SOAP, PHP-AJAX , PHP-WDDX-Python / PERL etc etc so your time will come to give a shot to PHP with MySQL :)

- Haroon Ahmad</description>
		<content:encoded><![CDATA[<p>Hi Jahzeel</p>
<p>Yeah, for now the MySQL database is prohibited because I am writing these articles in a series and I am going from scratch to super expert level step by step. For now you should do this assignment without MySQL however if you already have worked in MySQL then go ahead and give it a try. I will soon start PHP-MySQL portion and after that PHP-XML, PHP-Flatfiles (text files), PHP-cURL, PHP-SOAP, PHP-AJAX , PHP-WDDX-Python / PERL etc etc so your time will come to give a shot to PHP with MySQL <img src='http://fastcreators.com/article/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>- Haroon Ahmad
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Decision Making using PHP Switch Statement by Jehzeel Laurente</title>
		<link>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-221</link>
		<pubDate>Thu, 22 Feb 2007 00:15:26 +0000</pubDate>
		<guid>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-221</guid>
					<description>about the assignment. using a mysql database is prohibited? all data should be in the script i guess? Am I right? Hoping for your reply soon... :)</description>
		<content:encoded><![CDATA[<p>about the assignment. using a mysql database is prohibited? all data should be in the script i guess? Am I right? Hoping for your reply soon&#8230; <img src='http://fastcreators.com/article/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Decision Making using PHP Switch Statement by Jehzeel Laurente</title>
		<link>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-220</link>
		<pubDate>Wed, 21 Feb 2007 23:41:10 +0000</pubDate>
		<guid>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-220</guid>
					<description>wow! now i understand more about the PHP switch statement compared to http://w3schools.com

It's a very nice explanation indeed... I'll try to make the assignment.. :)</description>
		<content:encoded><![CDATA[<p>wow! now i understand more about the PHP switch statement compared to <a href="http://w3schools.com" rel="nofollow">http://w3schools.com</a></p>
<p>It&#8217;s a very nice explanation indeed&#8230; I&#8217;ll try to make the assignment.. <img src='http://fastcreators.com/article/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Decision Making using PHP Switch Statement by haroon.ahmad</title>
		<link>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-175</link>
		<pubDate>Sat, 10 Feb 2007 05:25:17 +0000</pubDate>
		<guid>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-175</guid>
					<description>Tedd I agree with you and I understand your point.. we are talking about two different usages of switch statement input section. you can either place true / 1 (which also means true) in the input of switch and this will make switch body to be executed and then all the case matching process will go on.

readers must understand that switch input section is like IF statement, if it gets any value other than 0 (which means false) it will execute its body.. 

so Tedd has shown you a method to get into the body of switch statement by passing true value to the switch input.. 

I have told you another use of switch input and that is to pass some values to it and then use it in the case making for example.

$name="haroon";
switch($name) { 
  case ($name == "tedd"):
   echo "thanks for your supportive comments for all readers";
  break;
 case ($name == "haroon"):
  echo "thanks for your nice article :)";
 break;
 default:
  echo "thanks for reading all these articles";
}</description>
		<content:encoded><![CDATA[<p>Tedd I agree with you and I understand your point.. we are talking about two different usages of switch statement input section. you can either place true / 1 (which also means true) in the input of switch and this will make switch body to be executed and then all the case matching process will go on.</p>
<p>readers must understand that switch input section is like IF statement, if it gets any value other than 0 (which means false) it will execute its body.. </p>
<p>so Tedd has shown you a method to get into the body of switch statement by passing true value to the switch input.. </p>
<p>I have told you another use of switch input and that is to pass some values to it and then use it in the case making for example.</p>
<p>$name=&#8221;haroon&#8221;;<br />
switch($name) {<br />
  case ($name == &#8220;tedd&#8221;):<br />
   echo &#8220;thanks for your supportive comments for all readers&#8221;;<br />
  break;<br />
 case ($name == &#8220;haroon&#8221;):<br />
  echo &#8220;thanks for your nice article <img src='http://fastcreators.com/article/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> &#8221;;<br />
 break;<br />
 default:<br />
  echo &#8220;thanks for reading all these articles&#8221;;<br />
}
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Detailed Guide On Arrays In PHP by haroon.ahmad</title>
		<link>http://fastcreators.com/article/2007/01/29/detailed-guide-to-arrays-in-php/#comment-174</link>
		<pubDate>Sat, 10 Feb 2007 05:12:48 +0000</pubDate>
		<guid>http://fastcreators.com/article/2007/01/29/detailed-guide-to-arrays-in-php/#comment-174</guid>
					<description>good point kenman, it is better to count the array rather than counting it in every loop run THOUGH i had given example according to my array size in the article which is small :) .. but still very good point and readers must take this under consideration.</description>
		<content:encoded><![CDATA[<p>good point kenman, it is better to count the array rather than counting it in every loop run THOUGH i had given example according to my array size in the article which is small <img src='http://fastcreators.com/article/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  .. but still very good point and readers must take this under consideration.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Detailed Guide On Arrays In PHP by kenman</title>
		<link>http://fastcreators.com/article/2007/01/29/detailed-guide-to-arrays-in-php/#comment-172</link>
		<pubDate>Sat, 10 Feb 2007 00:45:27 +0000</pubDate>
		<guid>http://fastcreators.com/article/2007/01/29/detailed-guide-to-arrays-in-php/#comment-172</guid>
					<description>finally...

&lt;code&gt;for ($i = 0; $i &#38;lt; count($array); ++$i) {&lt;br /&gt;
&#160;&#160;&#160;&#160;print $array[$i];&lt;br /&gt;
}&lt;/code&gt;

Two quick suggestions...

1) echo is faster than print.

2) "$i &#60; count($array)" will recount the size of the array on each iteration, which will get exponentially worse the larger the array is that you're working with. Instead, use: 

&lt;code&gt;for ($i = 0, $cnt = count($array); $i &#38;lt; $cnt; ++$i)&lt;/code&gt;

Otherwise, nice primer on arrays!</description>
		<content:encoded><![CDATA[<p>finally&#8230;</p>
<p><code>for ($i = 0; $i &amp;lt; count($array); ++$i) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;print $array[$i];<br />
}</code></p>
<p>Two quick suggestions&#8230;</p>
<p>1) echo is faster than print.</p>
<p>2) &#8220;$i &lt; count($array)&#8221; will recount the size of the array on each iteration, which will get exponentially worse the larger the array is that you&#8217;re working with. Instead, use: </p>
<p><code>for ($i = 0, $cnt = count($array); $i &amp;lt; $cnt; ++$i)</code></p>
<p>Otherwise, nice primer on arrays!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Decision Making using PHP Switch Statement by tedd</title>
		<link>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-169</link>
		<pubDate>Fri, 09 Feb 2007 18:41:06 +0000</pubDate>
		<guid>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-169</guid>
					<description>You said:

"the parenthesis of Switch accepts a value which is matched with cases and if any case if found true the block of code for that case is executed."

My point was that you don't need an input "variable" to be evaluated in the case statements that follow.  For example,

switch(1)
{
case 1==2:
echo("never);
break;

case 2==2:
echo("always");
break;

case 3==3:
echo("never);
break;
}

The entire statement is based upon truth values.

tedd</description>
		<content:encoded><![CDATA[<p>You said:</p>
<p>&#8220;the parenthesis of Switch accepts a value which is matched with cases and if any case if found true the block of code for that case is executed.&#8221;</p>
<p>My point was that you don&#8217;t need an input &#8220;variable&#8221; to be evaluated in the case statements that follow.  For example,</p>
<p>switch(1)<br />
{<br />
case 1==2:<br />
echo(&#8221;never);<br />
break;</p>
<p>case 2==2:<br />
echo(&#8221;always&#8221;);<br />
break;</p>
<p>case 3==3:<br />
echo(&#8221;never);<br />
break;<br />
}</p>
<p>The entire statement is based upon truth values.</p>
<p>tedd
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Decision Making using PHP Switch Statement by haroon.ahmad</title>
		<link>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-168</link>
		<pubDate>Fri, 09 Feb 2007 15:53:57 +0000</pubDate>
		<guid>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-168</guid>
					<description>Hi Tedd,

of course you will need INPUT for switch statement otherwise you cannot reach switch cases... INPUT that is coming in the switch statment in fact initiate the switch statement block and cases are matched then like Caedes posted in his comment.

however programmers also send variables through INPUT and use them in CASE conditions.</description>
		<content:encoded><![CDATA[<p>Hi Tedd,</p>
<p>of course you will need INPUT for switch statement otherwise you cannot reach switch cases&#8230; INPUT that is coming in the switch statment in fact initiate the switch statement block and cases are matched then like Caedes posted in his comment.</p>
<p>however programmers also send variables through INPUT and use them in CASE conditions.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Decision Making using PHP Switch Statement by tedd</title>
		<link>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-167</link>
		<pubDate>Fri, 09 Feb 2007 15:24:55 +0000</pubDate>
		<guid>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-167</guid>
					<description>Hi,

The "input" portion of your switch statement can be used, or not. All case conditions are tested on their truth and not necessarily compared to "input".

Try it, you'll see that I am right.

Cheers,

tedd

PS: I've never used the ELSE-IF statement.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>The &#8220;input&#8221; portion of your switch statement can be used, or not. All case conditions are tested on their truth and not necessarily compared to &#8220;input&#8221;.</p>
<p>Try it, you&#8217;ll see that I am right.</p>
<p>Cheers,</p>
<p>tedd</p>
<p>PS: I&#8217;ve never used the ELSE-IF statement.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Decision Making using PHP Switch Statement by caedes</title>
		<link>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-165</link>
		<pubDate>Thu, 08 Feb 2007 09:35:20 +0000</pubDate>
		<guid>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-165</guid>
					<description>Another utilisation of switch is :

switch (true) {
     case ($foo == $bar):
          print($foo);
          break;
     case ($foo == 0):
          print($bar);
          break;
}</description>
		<content:encoded><![CDATA[<p>Another utilisation of switch is :</p>
<p>switch (true) {<br />
     case ($foo == $bar):<br />
          print($foo);<br />
          break;<br />
     case ($foo == 0):<br />
          print($bar);<br />
          break;<br />
}
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Decision Making using PHP Switch Statement by caedes</title>
		<link>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-164</link>
		<pubDate>Thu, 08 Feb 2007 09:34:28 +0000</pubDate>
		<guid>http://fastcreators.com/article/2007/01/19/decision-making-using-switch-statement/#comment-164</guid>
					<description>Another utilisation of switch is :

switch (true) {
     case ($foo == $bar):
          print($foo);

}</description>
		<content:encoded><![CDATA[<p>Another utilisation of switch is :</p>
<p>switch (true) {<br />
     case ($foo == $bar):<br />
          print($foo);</p>
<p>}
</p>
]]></content:encoded>
				</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.292 seconds -->
