<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>INTE@CapU &#187; tutorial</title>
	<atom:link href="http://north.interactivedesignlab.com/archives/tag/tutorial/feed" rel="self" type="application/rss+xml" />
	<link>http://north.interactivedesignlab.com</link>
	<description>(Interactive Design Program at Capilano University)</description>
	<lastBuildDate>Mon, 15 Mar 2010 00:44:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>To IF or not to IF?</title>
		<link>http://north.interactivedesignlab.com/archives/705</link>
		<comments>http://north.interactivedesignlab.com/archives/705#comments</comments>
		<pubDate>Thu, 25 Feb 2010 04:22:40 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://north.interactivedesignlab.com/?p=705</guid>
		<description><![CDATA[One of the most used and important things you can do in PHP is an &#8220;if&#8221; statement.
if (!$variable1) {
echo &#8220;variable1 is NOT set&#8221;;
} else {
echo &#8220;variable1 is SET&#8221;;
}
Your typical IF statement. But if all you&#8217;re going to do is use ECHO to write a short string as output, then there&#8217;s a shortcut that I don&#8217;t <a href="http://north.interactivedesignlab.com/archives/705" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>One of the most used and important things you can do in PHP is an &#8220;if&#8221; statement.</p>
<p><span style="color:gray; font-family:Courier New;">if (!$variable1) {<br />
echo &#8220;variable1 is NOT set&#8221;;<br />
} else {<br />
echo &#8220;variable1 is SET&#8221;;<br />
}</span></p>
<p>Your typical IF statement. But if all you&#8217;re going to do is use ECHO to write a short string as output, then there&#8217;s a shortcut that I don&#8217;t see enough these days in people&#8217;s source code.</p>
<p><span style="color:gray; font-family:Courier New;">echo (!$variable1) ? &#8220;variable1 is NOT set&#8221; : &#8220;variable1 is SET&#8221;;</span></p>
<p>You&#8217;ve just condensed an IF statement into a single line. Obviously there are times when you would use this and times when you shouldn&#8217;t. But if you&#8217;re simply outputting a one liner like me here in the example code, this code is your friend.</p>
]]></content:encoded>
			<wfw:commentRss>http://north.interactivedesignlab.com/archives/705/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

