<?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>app &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/app/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>on web development</description>
	<lastBuildDate>Tue, 13 Feb 2018 08:18:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>PHP Strings: How to Get the Extension of a File</title>
		<link>/2011/07/29/php-strings-how-to-get-the-extension-of-a-file/</link>
		<comments>/2011/07/29/php-strings-how-to-get-the-extension-of-a-file/#comments</comments>
		<pubDate>Fri, 29 Jul 2011 06:25:32 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[Computer file formats]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[elegant solution]]></category>
		<category><![CDATA[EXE]]></category>
		<category><![CDATA[Filename]]></category>
		<category><![CDATA[gif]]></category>
		<category><![CDATA[jpeg]]></category>
		<category><![CDATA[path]]></category>

		<guid isPermaLink="false">/?p=2335</guid>
		<description><![CDATA[EXE or GIF or DLL or &#8230; Most of the code chunks I&#8217;ve seen about getting a file extension from a string are based on some sort of string manipulation. $filename = '/my/path/image.jpeg'; echo substr($filename, strrpos($filename, '.') + 1); Howerver there is a more elegant solution. $filename = '/my/path/image.jpeg'; echo strtolower(pathinfo($filename, PATHINFO_EXTENSION)); Thus you rely &#8230; <a href="/2011/07/29/php-strings-how-to-get-the-extension-of-a-file/" class="more-link">Continue reading <span class="screen-reader-text">PHP Strings: How to Get the Extension of a File</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2012/04/26/php-strings-dont-need-quotes/" rel="bookmark" title="PHP Strings Don&#8217;t Need Quotes">PHP Strings Don&#8217;t Need Quotes </a></li>
<li><a href="/2010/05/25/download-files-with-zend-framework/" rel="bookmark" title="Download Files with Zend Framework">Download Files with Zend Framework </a></li>
<li><a href="/2011/08/18/powerful-php-less-known-string-manipulation/" rel="bookmark" title="Powerful PHP: Less Known String Manipulation">Powerful PHP: Less Known String Manipulation </a></li>
<li><a href="/2010/10/04/some-php-tips-basename/" rel="bookmark" title="Some PHP Tips: basename()">Some PHP Tips: basename() </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>EXE or GIF or DLL or &#8230;</h2>
<p>Most of the code chunks I&#8217;ve seen about getting a file extension from a string are based on some sort of string manipulation.<br />
<figure id="attachment_2351" style="width: 235px" class="wp-caption aligncenter"><a href="/wp-content/uploads/2011/07/filename_extension.jpg"><img class="size-full wp-image-2351" title="filename_extension" src="/wp-content/uploads/2011/07/filename_extension.jpg" alt="Get the Filename Extension with PHP" width="235" height="235" srcset="/wp-content/uploads/2011/07/filename_extension.jpg 235w, /wp-content/uploads/2011/07/filename_extension-150x150.jpg 150w" sizes="(max-width: 235px) 100vw, 235px" /></a><figcaption class="wp-caption-text">If you want to get the filename extension with PHP is better to use pathinfo() than string manipulations</figcaption></figure></p>
<pre lang="php">$filename = '/my/path/image.jpeg';
echo substr($filename, strrpos($filename, '.') + 1);</pre>
<p>Howerver there is a more elegant solution.</p>
<pre lang="php">$filename = '/my/path/image.jpeg';
echo strtolower(pathinfo($filename, PATHINFO_EXTENSION));</pre>
<p>Thus you rely on PHP built in functions and it&#8217;s harder to overlook the exact string manipulation approach.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2012/04/26/php-strings-dont-need-quotes/" rel="bookmark" title="PHP Strings Don&#8217;t Need Quotes">PHP Strings Don&#8217;t Need Quotes </a></li>
<li><a href="/2010/05/25/download-files-with-zend-framework/" rel="bookmark" title="Download Files with Zend Framework">Download Files with Zend Framework </a></li>
<li><a href="/2011/08/18/powerful-php-less-known-string-manipulation/" rel="bookmark" title="Powerful PHP: Less Known String Manipulation">Powerful PHP: Less Known String Manipulation </a></li>
<li><a href="/2010/10/04/some-php-tips-basename/" rel="bookmark" title="Some PHP Tips: basename()">Some PHP Tips: basename() </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2011/07/29/php-strings-how-to-get-the-extension-of-a-file/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Stop Coding iPhone Apps, Begin with HTML5 Mobile Sites</title>
		<link>/2010/03/17/stop-coding-iphone-apps-begin-with-html5-mobile-sites/</link>
		<comments>/2010/03/17/stop-coding-iphone-apps-begin-with-html5-mobile-sites/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 14:55:45 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[mobile site]]></category>
		<category><![CDATA[ppk]]></category>
		<category><![CDATA[smart phones]]></category>

		<guid isPermaLink="false">/?p=1347</guid>
		<description><![CDATA[PPK is right! Stop developing everything as a iPhone app. First that doesn&#8217;t work on any device except iPhone and it&#8217;s difficult to maintain. In reverse you should begin doing your mobile web site version. Hopefully with HTML5. Do as Twitter did &#8230; or you&#8217;d be looking at http://m.digg.com/ &#8211; that&#8217;s the right way.<div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/03/10/change-the-viewport-be-ready-for-the-iphone/" rel="bookmark" title="Change the Viewport, be Ready for the iPhone!">Change the Viewport, be Ready for the iPhone! </a></li>
<li><a href="/2010/03/26/html5-makes-mobile-browsing-fun/" rel="bookmark" title="HTML5 Makes Mobile Browsing Fun">HTML5 Makes Mobile Browsing Fun </a></li>
<li><a href="/2010/03/09/php-detecting-mobile-device/" rel="bookmark" title="PHP: detecting mobile device">PHP: detecting mobile device </a></li>
<li><a href="/2010/03/18/mobile-internet-users-are-getting-more-important/" rel="bookmark" title="Mobile Internet Users are Getting More Important">Mobile Internet Users are Getting More Important </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p><a title="HTML5 apps" href="http://www.quirksmode.org/blog/archives/2010/03/html5_apps.html" target="_blank">PPK</a> is right! Stop developing everything as a iPhone app. First that doesn&#8217;t work on any device except iPhone and it&#8217;s difficult to maintain. In reverse you should begin doing your mobile web site version. Hopefully with HTML5.</p>
<p>Do as <a title="twitter" href="http://twitter.com/" target="_blank">Twitter</a> did &#8230; or you&#8217;d be looking at <a title="Mobile Digg" href="http://m.digg.com/" target="_blank">http://m.digg.com/</a> &#8211; that&#8217;s the right way.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/03/10/change-the-viewport-be-ready-for-the-iphone/" rel="bookmark" title="Change the Viewport, be Ready for the iPhone!">Change the Viewport, be Ready for the iPhone! </a></li>
<li><a href="/2010/03/26/html5-makes-mobile-browsing-fun/" rel="bookmark" title="HTML5 Makes Mobile Browsing Fun">HTML5 Makes Mobile Browsing Fun </a></li>
<li><a href="/2010/03/09/php-detecting-mobile-device/" rel="bookmark" title="PHP: detecting mobile device">PHP: detecting mobile device </a></li>
<li><a href="/2010/03/18/mobile-internet-users-are-getting-more-important/" rel="bookmark" title="Mobile Internet Users are Getting More Important">Mobile Internet Users are Getting More Important </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/03/17/stop-coding-iphone-apps-begin-with-html5-mobile-sites/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
