<?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: PHP if statement syntax</title>
	<atom:link href="http://www.tech-recipes.com/rx/288/php-if-statement-syntax/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tech-recipes.com/rx/288/php-if-statement-syntax/</link>
	<description>Computer and technology tutorials and guides</description>
	<lastBuildDate>Sun, 22 Nov 2009 02:44:39 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: davak</title>
		<link>http://www.tech-recipes.com/rx/288/php-if-statement-syntax/comment-page-1/#comment-14452</link>
		<dc:creator>davak</dc:creator>
		<pubDate>Sat, 22 Aug 2009 14:50:02 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-14452</guid>
		<description>Glad we could help!</description>
		<content:encoded><![CDATA[<p>Glad we could help!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Name</title>
		<link>http://www.tech-recipes.com/rx/288/php-if-statement-syntax/comment-page-1/#comment-14377</link>
		<dc:creator>Name</dc:creator>
		<pubDate>Wed, 19 Aug 2009 10:59:42 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-14377</guid>
		<description>I am a novie in php programming.I was looking for &quot;elseif&quot; in php and this writ up heloped me to do it..&lt;br&gt;&lt;br&gt;Thanking you &lt;br&gt;Anand V Mohan</description>
		<content:encoded><![CDATA[<p>I am a novie in php programming.I was looking for &#8220;elseif&#8221; in php and this writ up heloped me to do it..</p>
<p>Thanking you <br />Anand V Mohan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sagar </title>
		<link>http://www.tech-recipes.com/rx/288/php-if-statement-syntax/comment-page-1/#comment-11617</link>
		<dc:creator>Sagar </dc:creator>
		<pubDate>Wed, 20 May 2009 21:44:22 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-11617</guid>
		<description>My above suggestion is  the same as what Tom Elders suggested. I support it</description>
		<content:encoded><![CDATA[<p>My above suggestion is  the same as what Tom Elders suggested. I support it</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sagar </title>
		<link>http://www.tech-recipes.com/rx/288/php-if-statement-syntax/comment-page-1/#comment-11616</link>
		<dc:creator>Sagar </dc:creator>
		<pubDate>Wed, 20 May 2009 21:35:43 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-11616</guid>
		<description>yes, ternary condition does give a problem&lt;br&gt;&lt;br&gt;I would advise the following as well&lt;br&gt;&lt;br&gt; while($row = mysql_fetch_row):&lt;br&gt;if($condition = true) { $something = $value } &lt;br&gt;endwhile;</description>
		<content:encoded><![CDATA[<p>yes, ternary condition does give a problem</p>
<p>I would advise the following as well</p>
<p> while($row = mysql_fetch_row):<br />if($condition = true) { $something = $value } <br />endwhile;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oyeme</title>
		<link>http://www.tech-recipes.com/rx/288/php-if-statement-syntax/comment-page-1/#comment-8146</link>
		<dc:creator>Oyeme</dc:creator>
		<pubDate>Wed, 04 Feb 2009 05:53:59 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-8146</guid>
		<description>very useful if &quot;compatct mode&quot; :P</description>
		<content:encoded><![CDATA[<p>very useful if &#8220;compatct mode&#8221; :P</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peace love</title>
		<link>http://www.tech-recipes.com/rx/288/php-if-statement-syntax/comment-page-1/#comment-7406</link>
		<dc:creator>peace love</dc:creator>
		<pubDate>Fri, 16 Jan 2009 17:53:51 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-7406</guid>
		<description>Thats a great shorthand, and gives good readability!</description>
		<content:encoded><![CDATA[<p>Thats a great shorthand, and gives good readability!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Elders</title>
		<link>http://www.tech-recipes.com/rx/288/php-if-statement-syntax/comment-page-1/#comment-7147</link>
		<dc:creator>Tom Elders</dc:creator>
		<pubDate>Fri, 09 Jan 2009 10:16:53 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-7147</guid>
		<description>I think describing the ternary operator &quot;?&quot; as an if statement is a bit misleading. For example, inside a while loop:&lt;br&gt;&lt;br&gt;while($row = mysql_fetch_row):&lt;br&gt;    if($condition = true) { $something = $value }     &lt;br&gt;endwhile;&lt;br&gt;&lt;br&gt;that works. However, consider the following&lt;br&gt;&lt;br&gt;while($row = mysql_fetch_row):&lt;br&gt;    $something = ($condition = $true) ? $value : null;    &lt;br&gt;endwhile;&lt;br&gt;&lt;br&gt;If the condition is met, everything works fine, but on the next iteration of the loop, if the condition is not met, $something is set to null, which is probably not the desired effect 9 times out of 10.</description>
		<content:encoded><![CDATA[<p>I think describing the ternary operator &#8220;?&#8221; as an if statement is a bit misleading. For example, inside a while loop:</p>
<p>while($row = mysql_fetch_row):<br />    if($condition = true) { $something = $value }     <br />endwhile;</p>
<p>that works. However, consider the following</p>
<p>while($row = mysql_fetch_row):<br />    $something = ($condition = $true) ? $value : null;    <br />endwhile;</p>
<p>If the condition is met, everything works fine, but on the next iteration of the loop, if the condition is not met, $something is set to null, which is probably not the desired effect 9 times out of 10.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
