<?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/"
xmlns:series="http://unfoldingneurons.com/"
> <channel><title>Comments on: PHP Shorthand If / Else&#160;Examples</title> <atom:link href="http://davidwalsh.name/javascript-shorthand-if-else-examples/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name/javascript-shorthand-if-else-examples</link> <description>Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</description> <lastBuildDate>Thu, 09 Feb 2012 15:40:33 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3</generator> <item><title>By: Jesse</title><link>http://davidwalsh.name/javascript-shorthand-if-else-examples/comment-page-1#comment-28532</link> <dc:creator>Jesse</dc:creator> <pubDate>Fri, 13 Jan 2012 19:22:43 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/javascript-shorthand-if-else-examples/#comment-28532</guid> <description>Hmm apparently you can&#039;t show php tags in the code tags. Anyway.. if you look at the source you can see it commented out or maybe David can fix it.</description> <content:encoded><![CDATA[<p>Hmm apparently you can&#8217;t show php tags in the code tags. Anyway.. if you look at the source you can see it commented out or maybe David can fix it.</p> ]]></content:encoded> </item> <item><title>By: Jesse</title><link>http://davidwalsh.name/javascript-shorthand-if-else-examples/comment-page-1#comment-28531</link> <dc:creator>Jesse</dc:creator> <pubDate>Fri, 13 Jan 2012 19:20:14 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/javascript-shorthand-if-else-examples/#comment-28531</guid> <description>Thought I would include this extreme shorthand example that I use all the time based off this:&lt;code&gt;
Tall enough to ride?
&lt;/code&gt;</description> <content:encoded><![CDATA[<p>Thought I would include this extreme shorthand example that I use all the time based off this:</p><p><code><br
/> Tall enough to ride?<br
/> </code></p> ]]></content:encoded> </item> <item><title>By: Ian.J.Gough</title><link>http://davidwalsh.name/javascript-shorthand-if-else-examples/comment-page-1#comment-28486</link> <dc:creator>Ian.J.Gough</dc:creator> <pubDate>Mon, 09 Jan 2012 09:43:58 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/javascript-shorthand-if-else-examples/#comment-28486</guid> <description>Nice work thanks for sharing i&#039;ve re-wrote a script of mine and it&#039;s lot smaller now.
Many thanks and great site glad you got it back,
Ian
&lt;code&gt;
$title =  (!empty($tags[&#039;title&#039;]) ? $SpGr.$tags[&#039;title&#039;] : $SpRe.&#039;No title found&#039;).$SpCl;
&lt;/code&gt;</description> <content:encoded><![CDATA[<p>Nice work thanks for sharing i&#8217;ve re-wrote a script of mine and it&#8217;s lot smaller now.<br
/> Many thanks and great site glad you got it back,<br
/> Ian<br
/> <code><br
/> $title =  (!empty($tags['title']) ? $SpGr.$tags['title'] : $SpRe.'No title found').$SpCl;<br
/> </code></p> ]]></content:encoded> </item> <item><title>By: paul</title><link>http://davidwalsh.name/javascript-shorthand-if-else-examples/comment-page-1#comment-27931</link> <dc:creator>paul</dc:creator> <pubDate>Thu, 15 Dec 2011 00:51:58 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/javascript-shorthand-if-else-examples/#comment-27931</guid> <description>Hi, I have this code:$r = myfunction($param) ;
return $r ? $r : anotherfunction();I want to short it, but I can&#039;t call myfunction() twice. Is any chance to short it?</description> <content:encoded><![CDATA[<p>Hi, I have this code:</p><p>$r = myfunction($param) ;<br
/> return $r ? $r : anotherfunction();</p><p>I want to short it, but I can&#8217;t call myfunction() twice. Is any chance to short it?</p> ]]></content:encoded> </item> <item><title>By: kevin</title><link>http://davidwalsh.name/javascript-shorthand-if-else-examples/comment-page-1#comment-27259</link> <dc:creator>kevin</dc:creator> <pubDate>Sat, 15 Oct 2011 14:04:25 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/javascript-shorthand-if-else-examples/#comment-27259</guid> <description>great article. its easy to go a little nuts with shorthand conditionals given this knowledge :)</description> <content:encoded><![CDATA[<p>great article. its easy to go a little nuts with shorthand conditionals given this knowledge :)</p> ]]></content:encoded> </item> <item><title>By: TitoChhabra</title><link>http://davidwalsh.name/javascript-shorthand-if-else-examples/comment-page-1#comment-27039</link> <dc:creator>TitoChhabra</dc:creator> <pubDate>Thu, 29 Sep 2011 16:27:26 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/javascript-shorthand-if-else-examples/#comment-27039</guid> <description>Hello Everyone,
‘If… Else’ statement is used to perform different action for different decision. Conditional (relational operator) statements are used to perform different action on basis of different decision. So we can say that ‘If…Else’ statement generally used with conditional statement.............. for more details please check out this link....
http://mindstick.com/Articles/a3394e30-37b0-45e9-9e5d-8beffd1ba7dc/?If%E2%80%A6Else%20Statement%20in%20PHPthanks !!!!!!</description> <content:encoded><![CDATA[<p>Hello Everyone,<br
/> ‘If… Else’ statement is used to perform different action for different decision. Conditional (relational operator) statements are used to perform different action on basis of different decision. So we can say that ‘If…Else’ statement generally used with conditional statement&#8230;&#8230;&#8230;&#8230;.. for more details please check out this link&#8230;.<br
/> <a
href="http://mindstick.com/Articles/a3394e30-37b0-45e9-9e5d-8beffd1ba7dc/?If%E2%80%A6Else%20Statement%20in%20PHP" rel="nofollow">http://mindstick.com/Articles/a3394e30-37b0-45e9-9e5d-8beffd1ba7dc/?If%E2%80%A6Else%20Statement%20in%20PHP</a></p><p>thanks !!!!!!</p> ]]></content:encoded> </item> <item><title>By: Blair Nichols</title><link>http://davidwalsh.name/javascript-shorthand-if-else-examples/comment-page-1#comment-26980</link> <dc:creator>Blair Nichols</dc:creator> <pubDate>Sun, 25 Sep 2011 16:22:48 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/javascript-shorthand-if-else-examples/#comment-26980</guid> <description>Every time I get a little bit confused with conditional shorthand I seem to search and find this article I should bookmark it now as I always find it most helpful! Thanks David!</description> <content:encoded><![CDATA[<p>Every time I get a little bit confused with conditional shorthand I seem to search and find this article I should bookmark it now as I always find it most helpful! Thanks David!</p> ]]></content:encoded> </item> <item><title>By: mike</title><link>http://davidwalsh.name/javascript-shorthand-if-else-examples/comment-page-1#comment-26932</link> <dc:creator>mike</dc:creator> <pubDate>Mon, 19 Sep 2011 19:19:15 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/javascript-shorthand-if-else-examples/#comment-26932</guid> <description>&lt;code&gt;$no_data = &quot;NO DATA&quot;;
$date = $_POST[&#039;date&#039;];if($date==&quot;&quot;){
$_POST[&quot;$no_data&quot;]
}
else $_POST[&quot;$date&quot;]
return false;$message =&quot;This is the: $date&quot;;
&lt;code&gt;</description> <content:encoded><![CDATA[<p><code></p><p> $no_data = "NO DATA";<br
/> $date = $_POST['date'];</p><p> if($date==""){<br
/> $_POST["$no_data"]</p><p>}<br
/> else $_POST["$date"]<br
/> return false;</p><p>$message ="</p><p>This is the: $date</p><p>";<br
/> </code><code></code></p> ]]></content:encoded> </item> <item><title>By: mike</title><link>http://davidwalsh.name/javascript-shorthand-if-else-examples/comment-page-1#comment-26930</link> <dc:creator>mike</dc:creator> <pubDate>Mon, 19 Sep 2011 19:16:58 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/javascript-shorthand-if-else-examples/#comment-26930</guid> <description>Hi David,Need your help. Can you?I am relenting to the email source, forums and blogs out here. I am trying to kick myself in the rear and just create  php code on my own and it is just not working so instead I have to reach out for help.I want to do a simple script where if a text value is not entered in an email form, When the email is sent to me, I want it to display,&quot;NO DATA&quot; in the field I designate for it… example in my form &quot;Date of Service: NO DATA&quot; but, if the customer entered something in the field it will display properly….  &quot;Date of Service: 09/12/11&quot;.Again let me express this is all for the post &quot;send&quot; on the back end, NOT for the customer to see, but for me to see it when emailed to me.This is my code:**what am I doing wrong? can you help?</description> <content:encoded><![CDATA[<p>Hi David,</p><p>Need your help. Can you?</p><p>I am relenting to the email source, forums and blogs out here. I am trying to kick myself in the rear and just create  php code on my own and it is just not working so instead I have to reach out for help.</p><p>I want to do a simple script where if a text value is not entered in an email form, When the email is sent to me, I want it to display,</p><p>&#8220;NO DATA&#8221; in the field I designate for it… example in my form &#8220;Date of Service: NO DATA&#8221; but, if the customer entered something in the field it will display properly….  &#8220;Date of Service: 09/12/11&#8243;.</p><p>Again let me express this is all for the post &#8220;send&#8221; on the back end, NOT for the customer to see, but for me to see it when emailed to me.</p><p>This is my code:</p><p>**what am I doing wrong? can you help?</p> ]]></content:encoded> </item> <item><title>By: Chris</title><link>http://davidwalsh.name/javascript-shorthand-if-else-examples/comment-page-1#comment-26774</link> <dc:creator>Chris</dc:creator> <pubDate>Wed, 31 Aug 2011 08:43:38 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/javascript-shorthand-if-else-examples/#comment-26774</guid> <description>Great post - very helpful and yes, exactly what I was searching for. What I don&#039;t get is why this is missed out of so many PHP books. It&#039;s kinda an intermediate bit of knowledge, but so many books are either too basic or more advanced. I think the only place I have ever seen this is in my PHP cookbook, and as I can&#039;t find that right now, you just saved me a headache :D thx</description> <content:encoded><![CDATA[<p>Great post &#8211; very helpful and yes, exactly what I was searching for. What I don&#8217;t get is why this is missed out of so many PHP books. It&#8217;s kinda an intermediate bit of knowledge, but so many books are either too basic or more advanced. I think the only place I have ever seen this is in my PHP cookbook, and as I can&#8217;t find that right now, you just saved me a headache :D thx</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 1/17 queries in 0.013 seconds using disk: basic
Object Caching 865/866 objects using disk: basic

Served from: davidwalsh.name @ 2012-02-09 11:31:36 -->
