<?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>iBlog random &#187; code</title>
	<atom:link href="http://blog.zurka.us/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.zurka.us</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 28 May 2013 20:28:47 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6</generator>
		<item>
		<title>Write less PHP code</title>
		<link>http://blog.zurka.us/write-less-php-code/</link>
		<comments>http://blog.zurka.us/write-less-php-code/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 11:48:37 +0000</pubDate>
		<dc:creator>nasal</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://blog.zurka.us/?p=609</guid>
		<description><![CDATA[I found a funny but working way to write less php and more html code.. Instead of writing: &#60;?php echo &#039;&#60; form action=&#34;&#34; method=&#34;post&#34;&#62;&#039;; echo &#039;&#60; input type=&#34;text&#34; name=&#34;something&#34;&#62;&#039;; echo &#039;&#60; /form&#62;&#039;; ?&#62; We could write: &#60;?php { ?&#62; &#60; form action=&#34;&#34; method=&#34;post&#34;&#62; &#60; input type=&#34;text&#34; name=&#34;something&#34;&#62; &#60; /form&#62; &#60;?php } ?&#62; Or maybe instead [&#8230;]]]></description>
				<content:encoded><![CDATA[<div style="padding-top:15px;padding-right:0px;padding-bottom:0px;padding-left:0px;;" class="linksalpha_widget">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=iBlog+random&link=http%3A%2F%2Fblog.zurka.us%2Fwrite-less-php-code%2F&title=Write+less+PHP+code&desc=I+found+a+funny+but+working+way+to+write+less+php+and+more+html+code..+Instead+of+writing%3A+We+could+write%3A+%26lt%3B+form+action%3D%26quot%3B%26quot%3B+method%3D%26quot%3Bpost%26quot%3B%26gt%3B+%26lt%3B+input+type%3D%26quot%3Btext%26quot%3B+name%3D%26quot%3Bsomething%26quot%3B%26gt%3B+%26lt%3B+%2Fform%26gt%3B+Or+maybe+instead+of+this+if+-+else+method%3A+We+could+use%3A+%26lt%3B+div+class%3D%26quot%3Bok%26quot%3B%26gt%3B%26lt%3B+%2Fdiv%26gt%3B+%26lt%3B+div+class%3D%26quot%3Bko%26quot%3B%26gt%3B%26lt%3B+%2Fdiv%26gt%3B&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=&twrelated1=&twrelated2=&twctr=1&lnkdshow=noshow&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=1&diggbutton=1&diggctr=1&stblbutton=1&stblctr=1&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div><p>I found a funny but working way to write less php and more html code..</p>
<p>Instead of writing:</p>
<pre class="brush: php">
&lt;?php
	echo &#039;&lt; form action=&quot;&quot; method=&quot;post&quot;&gt;&#039;;
	echo &#039;&lt; input type=&quot;text&quot; name=&quot;something&quot;&gt;&#039;;
	echo &#039;&lt; /form&gt;&#039;;
?&gt;
</pre>
<p><span id="more-609"></span></p>
<p>We could write:</p>
<pre class="brush: php">
&lt;?php { ?&gt;
	&lt; form action=&quot;&quot; method=&quot;post&quot;&gt;
	&lt; input type=&quot;text&quot; name=&quot;something&quot;&gt;
	&lt; /form&gt;
&lt;?php } ?&gt;
</pre>
<p>Or maybe instead of this if &#8211; else method:</p>
<pre class="brush: php">
&lt;?php
if ($something == $value) {
	echo &#039;&lt; div class=&quot;ok&quot;&gt;The value is the same as $something&lt; /div&gt;&#039;;
} else {
	echo &#039;&lt; div class=&quot;ko&quot;&gt;The value is NOT the same as $something&lt; /div&gt;&#039;;
}
?&gt;
</pre>
<p>We could use:</p>
<pre class="brush: php">
&lt;?php if ($something == $value): ?&gt;
	&lt; div class=&quot;ok&quot;&gt;&lt; /div&gt;
&lt;?php else: ?&gt;
	&lt; div class=&quot;ko&quot;&gt;&lt; /div&gt;
&lt;?php endif; ?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.zurka.us/write-less-php-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
