<?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>overfloweblog &#187; shorthand</title>
	<atom:link href="http://overfloweb.com/blog/index.php/archives/tag/shorthand/feed" rel="self" type="application/rss+xml" />
	<link>http://overfloweb.com/blog</link>
	<description>are you driving me crazy?</description>
	<lastBuildDate>Sun, 13 May 2012 16:59:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Shorthand If / Else Examples</title>
		<link>http://overfloweb.com/blog/index.php/archives/6</link>
		<comments>http://overfloweb.com/blog/index.php/archives/6#comments</comments>
		<pubDate>Mon, 31 Mar 2008 15:14:30 +0000</pubDate>
		<dc:creator>overflow</dc:creator>
				<category><![CDATA[serverScript]]></category>
		<category><![CDATA[shorthand]]></category>

		<guid isPermaLink="false">http://overflow.ivyro.net/?p=6</guid>
		<description><![CDATA[출처 요기 http://davidwalsh.name/javascript-shorthand-if-else-examples &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- Basic True / False Declaration $is_admin = ($user['permissions'] == &#8216;admin&#8217; ? true : false); &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- Conditional Welcome Message echo &#8216;Welcome &#8216;.($user['is_logged_in'] ? $user['first_name'] : &#8216;Guest&#8217;).&#8217;!'; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- Conditional Items Message echo &#8216;Your cart contains &#8216;.$num_items.&#8217; item&#8217;.($num_items != 1 ? &#8216;s&#8217; : &#8221;).&#8217;.'; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- Conditional Error Reporting Level error_reporting($WEBSITE_IS_LIVE ? 0 : E_STRICT); [...]]]></description>
			<content:encoded><![CDATA[<p>출처 요기 <br /><A href="http://davidwalsh.name/javascript-shorthand-if-else-examples" target=_blank>http://davidwalsh.name/javascript-shorthand-if-else-examples</A> <br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- <br />Basic True / False Declaration <br />$is_admin = ($user['permissions'] == &#8216;admin&#8217; ? true : false); <br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- <br />Conditional Welcome Message <br />echo &#8216;Welcome &#8216;.($user['is_logged_in'] ? $user['first_name'] : &#8216;Guest&#8217;).&#8217;!'; <br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- <br />Conditional Items Message <br />echo &#8216;Your cart contains &#8216;.$num_items.&#8217; item&#8217;.($num_items != 1 ? &#8216;s&#8217; : &#8221;).&#8217;.'; <br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- <br />Conditional Error Reporting Level <br />error_reporting($WEBSITE_IS_LIVE ? 0 : E_STRICT); <br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- <br />Conditional Basepath <br />echo &#8216;&lt;base href=&#8221;http&#8217;.($PAGE_IS_SECURE ? &#8216;s&#8217; : &#8221;).&#8217;://mydomain.com&#8221; /&gt;&#8217;; <br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- <br />Nested PHP Shorthand <br />echo &#8216;Your score is:&nbsp; &#8216;.($score &gt; 10 ? ($age &gt; 10 ? &#8216;Average&#8217; : &#8216;Exceptional&#8217;) : ($age &gt; 10 ? &#8216;Horrible&#8217; : &#8216;Average&#8217;) ); <br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- <br />Leap Year Check <br />$is_leap_year = ((($year % 4) == 0) &amp;&amp; ((($year % 100) != 0) || (($year %400) == 0))); <br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- <br />Conditional PHP Redirect <br />header(&#8216;Location: &#8216;.($valid_login ? &#8216;/members/index.php&#8217; : &#8216;login.php?errors=1&#8242;)); exit(); <br />&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
]]></content:encoded>
			<wfw:commentRss>http://overfloweb.com/blog/index.php/archives/6/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

