<?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>WebProNews &#187; PHP</title>
	<atom:link href="http://www.webpronews.com/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.webpronews.com</link>
	<description>Breaking News in Tech, Search, Social, &#38; Business</description>
	<lastBuildDate>Mon, 13 Feb 2012 00:06:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Facebook Set To Unveil &#8220;Hyper PHP&#8221;</title>
		<link>http://www.webpronews.com/facebook-set-to-unveil-hyper-php-2010-02</link>
		<comments>http://www.webpronews.com/facebook-set-to-unveil-hyper-php-2010-02#comments</comments>
		<pubDate>Tue, 02 Feb 2010 14:46:32 +0000</pubDate>
		<dc:creator>Doug Caverly</dc:creator>
				<category><![CDATA[Social Media]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[HPHP]]></category>
		<category><![CDATA[Hyper PHP]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=52941</guid>
		<description><![CDATA[<p>A PHP project that's been underway for about two years is finally going to bear fruit for Facebook.&#160; Reports indicate that the company is set to announce the creation of &#34;Hyper PHP&#34; (or HPHP) today, and that Facebook will see speed improvements of around 80 percent as a result.<br />
]]></description>
			<content:encoded><![CDATA[<p>A PHP project that&#8217;s been underway for about two years is finally going to bear fruit for Facebook.&nbsp; Reports indicate that the company is set to announce the creation of &quot;Hyper PHP&quot; (or HPHP) today, and that Facebook will see speed improvements of around 80 percent as a result.</p>
<p><img align="right" alt="" src="http://images.ientrymail.com/webpronews/article_pics/FacebookLogo.jpg" />This trick relates to Web development, and more specifically, bridging the gap between interpreted languages and compiled languages.&nbsp; Hyper PHP is supposed to combine their strengths and more or less escape their weaknesses.</p>
<p><a href="http://www.readwriteweb.com/archives/facebook_gets_faster_debuts_homegrown_php_compiler.php">Mike Melanson</a> explained, &quot;PHP is normally an interpreted language, which means that every time a user accesses a PHP page, the server needs to take the code and interpret it to produce the final product.&nbsp; A compiler, however, makes this process much quicker, as the code is interpreted before the user ever asks for the page.&nbsp; The problem here is that any time that page needs to be changed, the code needs to be recompiled.&quot;</p>
<p>Hyper PHP should represent a major turning point, then.&nbsp; What&#8217;s more, it doesn&#8217;t look like Facebook will be the only beneficiary.&nbsp; The social network is due to make Hyper PHP available on an open source basis, so all sorts of sites may get speed boosts in the end.</p>
<p>We&#8217;ll update this post with more information when it becomes available.</p>
<p><strong>UPDATE</strong>: The official <a href="http://developers.facebook.com/news.php?blog=1&amp;story=358">announcement and explanation</a> are now available.</p>
<p><strong>Related Articles:</strong></p>
<p><span style="font-family: Arial;"><span style="font-size: larger;">&gt; </span></span><a style="color: rgb(0, 105, 210); text-decoration: underline;" href="http://www.webpronews.com/topnews/2010/01/21/facebook-page-owners-getting-more-stats"><span style="font-family: Arial;"><span style="font-size: larger;">Facebook Page Owners Getting More Stats</span></span></a></p>
<p><span style="font-family: Arial;"><span style="font-size: larger;">&gt; </span></span><a style="color: rgb(0, 105, 210); text-decoration: underline;" href="http://www.webpronews.com/topnews/2010/01/21/facebook-gets-into-customized-data-centers"><span style="font-family: Arial;"><span style="font-size: larger;">Facebook Gets Into Customized Data Centers</span></span></a></p>
<p><span style="font-family: Arial;"><span style="font-size: larger;">&gt; </span></span><a style="color: rgb(0, 105, 210); text-decoration: underline;" href="http://www.webpronews.com/topnews/2010/01/12/facebook-becomes-sponsor-of-apache-software-foundation"><span style="font-family: Arial;"><span style="font-size: larger;">Facebook Becomes Sponsor Of Apache Software Foundation</span></span></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/facebook-set-to-unveil-hyper-php-2010-02/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Is It Web Design, Or Web Development?</title>
		<link>http://www.webpronews.com/is-it-web-design-or-web-development-2008-04</link>
		<comments>http://www.webpronews.com/is-it-web-design-or-web-development-2008-04#comments</comments>
		<pubDate>Mon, 07 Apr 2008 16:30:26 +0000</pubDate>
		<dc:creator>Debbie Campbell</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=44886</guid>
		<description><![CDATA[<div class="entry"><p>I&#8217;m working with a prospective client who needs specialized e-commerce assistance - more than I&#8217;m capable of doing in a timely manner. So I found an experienced PHP programmer who can provide this expertise.</p>]]></description>
			<content:encoded><![CDATA[<div class="entry">
<p>I&rsquo;m working with a prospective client who needs specialized e-commerce assistance &#8211; more than I&rsquo;m capable of doing in a timely manner. So I found an experienced PHP programmer who can provide this expertise.</p>
<p>We met with the client today and all went well. The programmer has a good grasp of the rather non-traditional desires of the client as far as the workings of the checkout process, and that&rsquo;s great. I&rsquo;m not going to make as much money from the job as I originally thought, because I&rsquo;m now not going to be the one doing the cart, but the client will get exactly what he wants and hopefully I&rsquo;ll get a good long-term business relationship out of it.</p>
<p>What irked me today was the way the programmer continually referred to me as &lsquo;the one who&rsquo;ll make it all pretty.&rsquo;</p>
<p>&lsquo;Pretty&rsquo; isn&rsquo;t the tip of the iceberg. What I bring to the table goes way beyond aesthetics.</p>
<p>It&rsquo;s 9 years of personal e-commerce experience and 12 years of building websites; a strong graphic design background; an understanding of search engine optimization practices; a deep understanding of cross-browser compatibility and web standards; familiarity with Section 508 accessibility guidelines; the ability to partner with my clients and provide as much education on the care of feeding of their web presence as they can take; an understanding of information architecture and navigation; and an understanding of how to create a website that engages the customer from page one.</p>
<p>Programmers think that my job is all about aesthetics, and hard-core designers think that I shouldn&rsquo;t use the word &lsquo;creative&rsquo; in my business name because I&rsquo;m not really a creative if I work with code. I&rsquo;ve actually been told that to my face&hellip;</p>
<p>What exactly am I? I refer to myself as a designer/developer on my business cards and I thought that covered the bases pretty well, but perhaps not. Should I consider reworking my title yet again? Web strategist? Web jack-of-all-trades? Web designoper? Web develsigner?</p>
<p><a href="http://www.position-relative.com/~relat1ve/2008/04/04/mini-rant-on-titles-web-designer-or-web-developer/">Comments</a></p>
</div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/is-it-web-design-or-web-development-2008-04/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TechCrunch, Others Love Linux, MySQL</title>
		<link>http://www.webpronews.com/techcrunch-others-love-linux-mysql-2007-02</link>
		<comments>http://www.webpronews.com/techcrunch-others-love-linux-mysql-2007-02#comments</comments>
		<pubDate>Mon, 26 Feb 2007 16:44:35 +0000</pubDate>
		<dc:creator>WebProNews Staff</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[FeedBurner]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Meebo]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Pingdom]]></category>
		<category><![CDATA[TechCrunch]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=35590</guid>
		<description><![CDATA[A survey by Pingdom of seven heavily visited websites found plenty of Apache web servers and PHP coding on their platforms, where Linux carries the platform and MySQL handles the database needs. ]]></description>
			<content:encoded><![CDATA[<p>A survey by Pingdom of seven heavily visited websites found plenty of Apache web servers and PHP coding on their platforms, where Linux carries the platform and MySQL handles the database needs. <span id="more-35590"></span></p>
<p>Some interesting observations came to the people at uptime monitoring firm <a href="http://www.pingdom.com">Pingdom</a>. </p>
<p>They managed to get seven noteworthy websites to agree to share some details about their infrastructure. </p>
<p>None of them seemed willing to part with an administrator password, oddly enough.  </p>
<p>The websites <a href="http://royal.pingdom.com/?p=95">surveyed</a> for the report: <a href="http://www.techcrunch.com">TechCrunch</a>, <a href="http://www.feedburner.com/">FeedBurner</a>, <a href="http://www.istockphoto.com/">iStockphoto</a>, <a href="http://www.yousendit.com/">YouSendIt</a>, <a href="http://www.meebo.com/">Meebo</a>, <a href="http://www.vimeo.com/">Vimeo</a>, and <a href="http://www.alexaholic.com/">Alexaholic</a>.  </p>
<p>They were nearly unanimous with their choice of database backends. </p>
<p><a href="http://www.mysql.com">MySQL</a> owned the field, as six of seven sites said they use it. All but Alexaholic run MySQL on Linux; Alexaholic uses Microsoft SQL Server on Windows.  </p>
<p>To get pages to their web visitors, five of the seven sites chose <a href="http://httpd.apache.org">Apache</a>, as have the bulk of other websites on the Internet. </p>
<p>Alexaholic runs IIS on Windows, while Meebo has tapped relative newcomer <a href="http://www.lighttpd.net/">Lighttpd</a>, called &#8216;Lighty&#8217;, for their web serving requirements. </p>
<p>Except for Alexaholic, the other webservers all run on Linux.  </p>
<p>&ldquo;Lighttpd tends to work really well with AJAX-based sites like ours,&rdquo; said Simon Yeo, director of operations at Meebo, in the blog. </p>
<p>Lighttpd also boasts usage at big-time sites such as YouTube and Wikipedia.  </p>
<p><a href="http://php.net/">PHP</a> has a place on five of the seven sites, either on its own or in conjunction with other languages like Perl or Java. </p>
<p>Alexaholic&#8217;s Ron Hornbaker favored C# .NET, which is in line with his comfort zone, while Meebo primarily has C and C++ in its code.  </p>
<p>When asked about his Microsoft favoritism, Hornbaker told Pingdom he&#8217;s familiar with the .NET platform. </p>
<p>&ldquo;I&rsquo;m most comfortable coding with C#.NET, and this was a personal project,&rdquo; he said.  <br />
&#8212; <br />
<small></small>  </p>
<p>Add to <a class="printMailTop" onclick="window.open('http://del.icio.us/post?v=4'partner=wpn'noui'jump=close'url='+encodeURIComponent(location.href)+''title='+encodeURIComponent(document.title),'delicious','toolbar=no,width=700,height=400'); return false;" href="http://del.icio.us/post"><img border="0" src="http://images.ientrymail.com/webpronews/delicious-pic.png" alt="" /> Del.icio.us</a> | <a href="javascript:void window.open('http://digg.com/submit?phase=2&amp;url='+encodeURIComponent(window.location.href)+'&amp;ei=UTF-8','popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)"><img border="0" src="http://images.ientrymail.com/webpronews/digg-pic.png" alt="" /> Digg</a>  | <a href="javascript:location.href='http://reddit.com/submit?url='+encodeURIComponent(location.href)+'&amp;title='+encodeURIComponent(document.title)"><img border="0" src="http://images.ientrymail.com/webpronews/reddit.png" alt="" /> Reddit</a> | <a href="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(document.location.href)+'&amp;t='+encodeURIComponent(document.title)+' '"><img border="0" src="http://images.ientrymail.com/webpronews/furl-pic.png" alt="" /> Furl</a>  </p>
<p>Bookmark WebProNews: <a href="http://www.webpronews.com"><img border="0" src="http://images.ientrymail.com/webpronews/wpn-readit.jpg" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/techcrunch-others-love-linux-mysql-2007-02/feed</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Latest WordPress Bugfixes</title>
		<link>http://www.webpronews.com/latest-wordpress-bugfixes-2007-02</link>
		<comments>http://www.webpronews.com/latest-wordpress-bugfixes-2007-02#comments</comments>
		<pubDate>Thu, 22 Feb 2007 02:21:54 +0000</pubDate>
		<dc:creator>Neville Hobson</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Reddit]]></category>
		<category><![CDATA[Sandbox]]></category>
		<category><![CDATA[Upgrade]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=35451</guid>
		<description><![CDATA[If you upgraded to or installed the <a href="http://wordpress.org/development/2007/01/ella-21/">new WordPress version 2.1</a> that was released last month, you&#8217;ll be interested in a major <a href="http://wordpress.org/development/2007/02/new-releases/">bugfix released today</a>:  <blockquote>
<p>[&#8230;] Version 2.1.1 includes about 30 bug fixes, mostly minor things around encoding, XML-RPC, the object cache, and HTML code. It&#8217;s available for immediate download on our download page.</p>]]></description>
			<content:encoded><![CDATA[<p>If you upgraded to or installed the <a href="http://wordpress.org/development/2007/01/ella-21/">new WordPress version 2.1</a> that was released last month, you&rsquo;ll be interested in a major <a href="http://wordpress.org/development/2007/02/new-releases/">bugfix released today</a>:<br />
<blockquote>
<p>[&hellip;] Version 2.1.1 includes about 30 bug fixes, mostly minor things around encoding, XML-RPC, the object cache, and HTML code. It&rsquo;s available for immediate download on our download page.</p>
</blockquote>
<p>Not only that, WordPress has released a security patch for version 2.0.7 to upgrade it to version 2.0.9:</p>
<blockquote>
<p>Version 2.0.9 only includes the security update, which was around the code we use to prevent <a href="http://en.wikipedia.org/wiki/Cross_site_scripting">XSS</a>. [&hellip;] As a reminder, we&rsquo;ve committed to proving security updates to 2.0 through 2010, but all new features and development are going into the newer branch, which is at this time 2.1.</p>
</blockquote>
<p>An easy way to upgrade either version is to install just the changed files. <a href="http://techtites.com/2007/02/21/wordpress-211-and-209-released/">Ajay D&rsquo;Souza makes it easy</a>. I expect <a href="http://www.nevillehobson.com/2007/02/10/php-issues-and-wordpress/#comment-24737">Paul Woodhouse will have an interest</a> in this <img src="http://www.nevillehobson.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /> </p>
<p>I haven&rsquo;t yet made the jump to 2.1 on this blog (but I did on my <a href="http://www.nevillehobson.com/sandbox/">sandbox</a>) as I&rsquo;m still dithering about the <a href="http://getk2.com/">K2 theme</a>. There&rsquo;s also the issue for me re <a href="http://www.nevillehobson.com/2007/02/10/php-issues-and-wordpress/">Dreamhost and PHP</a>. Although this blog hasn&rsquo;t fallen over so far, I really must find time soon to upgrade.</p>
<p><strong>Related post:</strong></p>
<ul>
<li><a href="http://www.nevillehobson.com/2007/01/25/should-you-upgrade-to-wordpress-21/">Should you upgrade to WordPress 2.1?</a></li>
</ul>
<p><a href="http://www.nevillehobson.com/2007/02/21/bugfixes-for-latest-wordpress/#comments">Comments</a></p>
<p>Tag:  </p>
<p><a href="javascript:location.href='http://reddit.com/submit?url='+encodeURIComp<br />
onent(location.href)+'&amp;title='+encodeURIComponent(document.title)"><img border="0" src="http://images.ientrymail.com/webpronews/reddit.png" alt="" />Reddit</a> | <a href="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeUR<br />
IComponent(document.location.href)+'&amp;t='+encodeURIComponent(document.title)+<br />
'   '"><img border="0" src="http://images.ientrymail.com/webpronews/furl-pic.png" alt="" /> Furl</a>   </p>
<p>Bookmark WebProNews: <a href="http://www.webpronews.com"><img border="0" src="http://images.ientrymail.com/webpronews/wpn-readit.jpg" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/latest-wordpress-bugfixes-2007-02/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using PHP Buttons In Dreamweaver</title>
		<link>http://www.webpronews.com/using-php-buttons-in-dreamweaver-2007-01</link>
		<comments>http://www.webpronews.com/using-php-buttons-in-dreamweaver-2007-01#comments</comments>
		<pubDate>Wed, 10 Jan 2007 19:56:23 +0000</pubDate>
		<dc:creator>Jay Gilbert</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=34318</guid>
		<description><![CDATA[Even if you don't know one bit of PHP, the Dreamweaver PHP buttons can help you create database functions on your webpages. Learn more in this lesson on Dreamweaver and PHP/SQL.
]]></description>
			<content:encoded><![CDATA[<p>Even if you don&#8217;t know one bit of PHP, the Dreamweaver PHP buttons can help you create database functions on your webpages. Learn more in this lesson on Dreamweaver and PHP/SQL.</p>
<p>I&#8217;ll admit that I am not a coder and I don&#8217;t know much more than a tiny bit of PHP at the time of writing this. However, I have managed to create database driven webpages, and even password protected members only areas due to the extremely easy to use PHP buttons in Dreamweaver.</p>
<p>If you are interested in learning to do this for yourself, this lesson will point you in the right direction so that you can experiment and see for yourself how easy it is.</p>
<p>The first thing you need to do is to create an SQL database on your webhost. This can be done via CPanel or if not that, then ask your host how&#8230;anyways, creating an SQL database with 1 table is not hard.</p>
<p>The key is, to create it, record the information and then try to log in to that database via Dreamweaver.</p>
<p>You can do this by creating a new database connection in the Application window of Dreamweaver.</p>
<p>This is one of the most challenging parts, and you&#8217;ll need to set up the site&#8217;s testing server. At first this can be tricky, but if you stick with it and get connected to your SQL databas via Dreamweaver, youll soon find ways to insert records, display records, and much more!</p>
<p>You see, once you are connected to the database, the table names will dynamically show up in Dreamweaver, and from there it is only a short step to learn how to insert records, repeat records, and display data in the database.</p>
<p>Of course reading a book can help you with PHP, but it is also fun to just jump right in the Dreamweaver buttons. </p>
<p>Even a total PHP dunce like myself was able to start creating little PHP/SQL applications once I figured out these basic steps.</p>
<p>So if you want to create PHP applications, but don&#8217;t know how to hand-code PHP, create a PHP/SQL database with 1 table, figure out how to connect to it via Dreamweaver, and start messing around with the Dreamweaver PHP buttons.</p>
<p>In a few hours time you&#8217;ll see what creating PHP/SQL applications in Dreamweaver is all about.</p>
<p>For more information on Dreamweaver including step by step video tutorials, visit http://www.dreamweaverhowto.com </p>
<p>Jay Gilbert offers step by step guides for people who want to sell info products online.  Sign up for the free Dreamweaver tips training course.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/using-php-buttons-in-dreamweaver-2007-01/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP Development Becoming Increasingly Popular</title>
		<link>http://www.webpronews.com/php-development-becoming-increasingly-popular-2007-01</link>
		<comments>http://www.webpronews.com/php-development-becoming-increasingly-popular-2007-01#comments</comments>
		<pubDate>Tue, 02 Jan 2007 15:46:20 +0000</pubDate>
		<dc:creator>Andy West</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=34045</guid>
		<description><![CDATA[PHP simply refers to Hypertext Preprocessor and is becoming quite popular due to the wide nature of functions that it can be used for.
]]></description>
			<content:encoded><![CDATA[<p>PHP simply refers to Hypertext Preprocessor and is becoming quite popular due to the wide nature of functions that it can be used for.</p>
<p>Also, PHP development is relatively simple for newcomers to learn the basics. As well, more advanced programmers are also using PHP development because there is almost no limit to what can be done when it is used properly.</p>
<p>PHP can be used on most operating systems, which makes it quite versatile. Whether you use Microsoft Windows, Linux, MAC OS X or a wide variety of other OS&#8217;s. PHP also allows you to choose an operating system and web browser that you are most comfortable with. One of the great features of PHP development is that it allows support for almost any kind of database that you could think of.</p>
<p>PHP development is basically referring to an open source scripting language. It&#8217;s most common uses are for web development and it can also be imbedded into HTML. Since it is such a versatile form of script writing, it can be used by the beginning programmers as well as the more advanced ones. In only a few hours, you can learn the basics of PHP development so that you can begin to use PHP to your advantage. Also, if you are an experienced programmer, you can utilize some of the more advanced features of PHP in order to capitalize on your potential.</p>
<p>Web development is becoming a more prosperous industry lately. Since the Interet and the computer wave in general is becoming quite lucrative, web development is becoming a booming industry in which everyone wants to be a part. However, it is also a very competitive industry since there are many professionals that are quite adept at programming. Therefore, learning proper PHP development strategies is beneficial. If you already have prior knowledge of computer language and coding, PHP should come as a second nature to you. The fact that is can be used in its most primal forms for basic programming as well as incredibly advanced programming ! only ads to its possible potential for programmers.</p>
<p>In order to become a succesful web developer, you will need to familiarize yourself with all of the different aspects of computer programming langage. Since this industry is booming more than almost any other industry right now, there are always new languages to learn and new programming developments to enquire about. Although PHP development isn&#8217;t all that new, it is quickly becoming the preferred method among many of the high ranking computer programmers. The amount of versatitily that this language gives you combined with its relatively easy learning curve make it a very desirable language to learn.</p>
<p>Web development is not something that just anyone should jump into. It takes a certain amount of knowledge and skill to be able to properly negotiate the different codes that are used. However, if you are already quite familiar with language code, then you will not have any trouble at all using PHP development to better your skills as well as improving your output.</p>
<p>Being  a web developer is a very complex industry. There are always new things to learn on an almost daily basis so you always have to be on the top of your game. The world of PHP development is ever changing and will continue to flourish, so it is advisable to keep up to date with the new capabilities of this type of programming. PHP development is one of the most effective and simple to use programming devices available today.</p>
<p>Tag:     </p>
<p>Add to <a href="http://del.icio.us/post"onclick="window.open('http://del.icio.us/post?v=4&#038;partner=wpn&#038;noui&#038;jump=close&#038;url='+encodeURIComponent(location.href)+'&#038;title='+encodeURIComponent(document.title),'delicious','toolbar=no,width=700,height=400'); return false;"   CLASS="printMailTop"><img   src="http://images.ientrymail.com/webpronews/delicious-pic.png" border=0> Del.icio.us</a> | <a href="javascript:voidwindow.open('http://digg.com/submit?phase=2&#038;url='+encodeURIComponent(window.location.href)+'&#038;ei=UTF-8','popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)"><img     src="http://images.ientrymail.com/webpronews/digg-pic.png" border=0> Digg</a> | <a   href="javascript:location.href='http://reddit.com/submit?url='+encodeURIComponent(location.href)+'&#038;title='+encodeURIComponent(document.title)"><img    src="http://images.ientrymail.com/webpronews/reddit.png" border=0>Reddit</a> | <a   href="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(document.location.href)+'&#038;t='+encodeURIComponent(document.title)+ '     '"><img src="http://images.ientrymail.com/webpronews/furl-pic.png" border=0> Furl</a>    </p>
<p>Bookmark WebProNews: <a href="http://www.webpronews.com"><img src="http://images.ientrymail.com/webpronews/wpn-readit.jpg" border=0></a></p>
<p>Andy West is a freelance writer for PhpMyDev.com . PhpMyDev offers complete web development and hosting using Linux, Apach, Mysql and <a href=http://www.phpmydev.com> PHP development</a> (LAMP). Visit <a href="http://www.PhpMyDev.com">http://www.PhpMyDev.com</a> for more information.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/php-development-becoming-increasingly-popular-2007-01/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Playing w/ del.icio.us Web Badge JSON API</title>
		<link>http://www.webpronews.com/playing-w-delicious-web-badge-json-api-2006-12</link>
		<comments>http://www.webpronews.com/playing-w-delicious-web-badge-json-api-2006-12#comments</comments>
		<pubDate>Thu, 21 Dec 2006 17:12:56 +0000</pubDate>
		<dc:creator>Joost de Valk </dc:creator>
				<category><![CDATA[Search]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Blogs]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[Delicious]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[FAST]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Library]]></category>
		<category><![CDATA[Online]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=33912</guid>
		<description><![CDATA[<a href="http://www.niallkennedy.com/blog/archives/2006/12/delicious-url-api.html" class="bluelink">Niall Kennedy</a> wrote on his blog that The Yahoo Developer Network provided a <a href="http://developer.yahoo.net/blog/archives/2006/12/preview_of_the.html" class="bluelink">short preview of the soon to be released del.icio.us webbadge</a>.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.niallkennedy.com/blog/archives/2006/12/delicious-url-api.html" class="bluelink">Niall Kennedy</a> wrote on his blog that The Yahoo Developer Network provided a <a href="http://developer.yahoo.net/blog/archives/2006/12/preview_of_the.html" class="bluelink">short preview of the soon to be released del.icio.us webbadge</a>.</p>
<p>From this preview you could see an endpoint and a parameter, so Niall tried and it worked for everyone. That inspired me to make <a href="http://www.joostdevalk.nl/code/delicious.php" class="bluelink">this fast PHP implementation</a> of it, using the <a href="http://framework.zend.com/manual/en/zend.json.basics.html" class="bluelink">Zend framework JSON library</a>. If you&#8217;re interested, have a look at <a href="http://www.joostdevalk.nl/code/delicious.phps" class="bluelink">the code</a>.</p>
<p><a href="http://www.joostdevalk.nl/blog/playing-with-the-delicious-web-badge-json-api-using-php/#respond" class="bluelink">Comments</a></p>
<p>Bookmark WebProNews: <a href=http://www.webpronews.com><img src=http://images.ientrymail.com/webpronews/wpn-readit.jpg border=0></a></p>
<p>Joost de Valk is an SEO from Nijmegen, the Netherlands, who works for <a href="http://www.onetomarket.nl">Onetomarket</a>, an online marketing company. He has experience as a sales manager for several IT companies, is involved in open source projects like WebKit and Mozilla, and is the creator of the <a href="http://www.css3.info">biggest online resource on CSS3</a>. Joost <a href="http://www.joostdevalk.nl/blog/">blogs about web design and SEO</a>, and writes all sorts of scripts for webmasters.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/playing-w-delicious-web-badge-json-api-2006-12/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Choosing a Framework for Web Development</title>
		<link>http://www.webpronews.com/choosing-a-framework-for-web-development-2006-12</link>
		<comments>http://www.webpronews.com/choosing-a-framework-for-web-development-2006-12#comments</comments>
		<pubDate>Mon, 04 Dec 2006 17:53:20 +0000</pubDate>
		<dc:creator>Christine Anderssen</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=33357</guid>
		<description><![CDATA[I recently had the opportunity to develop a small online booking system. This time around I was determined to make use of some development framework.
]]></description>
			<content:encoded><![CDATA[<p>I recently had the opportunity to develop a small online booking system. This time around I was determined to make use of some development framework.</p>
<p>The slow slog of writing all my code from scratch is not for me &#8211; surely we have moved beyond that now in web development? </p>
<p>The big question was &#8211; which framework to use? Since the advent of Ruby on Rails, development frameworks have become quite the flavour d&#8217;jour and there are now, well, maybe not thousands of them, but quite a few! The last time I heard there are about 80 development frameworks out there. I am not 100% user of this number, it could be a bit higher, it could be a bit more conservative (on this site you can find about 40 PHP frameworks listed &#8211; <a href="http://www.phpwact.org/php/mvc_frameworks" class="bluelink">www.phpwact.org/php/mvc_frameworks</a>). The point is, the web developer is now really spoilt for choice. Which is a problem in itself, since having too much choice can leave you dithering between different options.</p>
<p>This article is therefore about how I made my choice, which was CakePHP, and which factors I took into consideration. </p>
<p>Obviously and certainly I will get bombarded with &#8220;Why don&#8217;t you try X framework, it is really much simpler to use&#8230;&#8221; type responses. That is quite OK, to each his own! But this is the choice I made and I am sticking to it. Frankly, the idea of going through another learning curve gives me the heeby-jeeby&#8217;s&#8230;.</p>
<p>I found that the selection criteria were not independent. In other words, once I&#8217;ve ruled out some frameworks due to some specific criteria, other factors came into play. It was therefore more a process of elimination than judging all the frameworks off a predefined set of criteria.</p>
<p>The first major selection point was: Ruby on Rails or not.</p>
<p>Obviously there is the attraction of using a brand new, hip, buzz-word hyped framework. You can&#8217;t go wrong with something that is getting so much attention&#8230; or can you?</p>
<p>Let&#8217;s look at some of the selection criteria that filtered out Ruby on Rails&#8221;</p>
<p><b>1. Ease of installation and ability to run on shared hosting</b></p>
<p>The problem is that most of my clients make use of a shared hosting environment. Can Ruby on Rails run on common-or garden variety type shared hosting? The answer was, I soon discovered &#8211; no. One needs to either have access your own private servers or run on a shared hosting environment that has Ruby on Rails pre-installed. Admittedly, there are a couple of them now starting up. A comprehensive list of hosting providers that offer Ruby On Rails hosting can be found on the RoR Wiki &#8211; <a href="http://wiki.rubyonrails.org/rails/pages/RailsWebHosts" class="bluelink">wiki.rubyonrails.org/rails/pages/RailsWebHosts</a></p>
<p><b>2. Minimize the learning curve</b></p>
<p>Even though I knew that any new framework will involve a steep learning curve, I really didn&#8217;t have the guts to go through TWO learning curves &#8211; one for the language itself and one for the framework. I might still have been prepared to go through the learning curve though if it wasn&#8217;t for the fact that RoR requires special hosting.</p>
<p>So basically the decision was: Not RoR. And based on criterion 2, I decided to stick to a PHP framework, and not go for something else based on Perl or something else since I&#8217;ve been developing in PHP for the past two, almost three years. Having said this, it is all very well to say that CakePHP allows you to use your PHP skills &#8211; because it is an object oriented framework/MVC based framework it has its own rich language infrastructure. You still need to learn the CakePHP terminology and the learning curve is pretty steep!</p>
<p><b>3. Ability to run on PHP 4</b></p>
<p>Although PHP 5 offers more object oriented features, once again, not all shared hosts offer PHP 5 out of the box. I decided that I wanted to stick to a framework that will offer backwards compatibility and enable me to run on most of the servers that I, as well as my clients, host on.</p>
<p>My further criteria came down to:</p>
<p><b>4. Must have good documentation</b></p>
<p>Under good documentation I count the following:</p>
<p>- User manual</p>
<p>- Examples and code snippets</p>
<p>- Screen casts and videos &#8211; although I do not see these as essential</p>
<p><b>5. Good support by the user community</b></p>
<p>This, in combination with formal documentation is absolutely essential. All of these frameworks are pretty young and the documentation is also constantly evolving. Some documentation might be patchy in details. This is where the user support in terms of the community comes in. How active are the forums? Is there a bug tracker? Any other informal tutorials, write-ups, comments, blogs and other support? </p>
<p>6. Regular upgrades and bug fixes</p>
<p>..but not so close to each other that the software becomes unstable and unusable. Backward compatibility is also important. Version number of the software can be used to indicate maturity.</p>
<p>Working off the following list (<a href="http://www.phpit.net/article/ten-different-php-frameworks/" class="bluelink">www.phpit.net/article/ten-different-php-frameworks/</a>) one can see that the list has narrowed down to the following frameworks:</p>
<p>- CakePHP</p>
<p>- Seagull Framework</p>
<p>- WACT &#8211; &#8216;disqualified&#8217; since the latest version now requires PHP 5</p>
<p>- Zoop</p>
<p>- CodeIgniter</p>
<p>The next step was a bit less scientific &#8211; but still fitted in with point 5 &#8211; how well is this Framework regarded? How much support does it generate in the &#8216;community&#8217;.</p>
<p>I scouted through forums and followed links and surfed the net and tried to get a general feel &#8211; and overall, CakePHP did seem to come out tops. A similar check that one can do is the following &#8211; do a Google search for each of the frameworks and see how many results are returned. This will give you a good idea of the general support, number of tutorials, number of forum posts and general &#8216;talked about&#8217; factor for the specific framework. The results for this exercise can be seen here: <a href="http://www.tm4y.co.za/cakephp/ruby-on-rails-popularity-for-web-development.html" class="bluelink">http://www.tm4y.co.za/cakephp/ruby-on-rails-popularity-for-web-development.html</a></p>
<p>In summary therefore, the support for Ruby on Rails and the amount of information available for it is astounding and you will probably not go wrong if you decide to go this route. But if you want to stick with a PHP framework &#8211; CakePHP seems to be the route to go! </p>
<p>Tag: </p>
<p>Add to <a href="http://del.icio.us/post"  onclick="window.open('http://del.icio.us/post?v=4&#038;partner=wpn&#038;noui&#038;jump=close&#038;url='+encodeURIComponent(location.href)+'&#038;title='+encodeURIComponent(document.title),'delicious','toolbar=no,width=700,height=400'); return false;"   CLASS="printMailTop"><img  src=http://images.ientrymail.com/webpronews/delicious-pic.png border=0> Del.icio.us</a> | <a href="javascript:void window.open('http://digg.com/submit?phase=2&#038;url='+encodeURIComponent(window. location.href)+'&#038;ei=UTF-8','popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)"><img src=http://images.ientrymail.com/webpronews/digg-pic.png border=0> Digg</a> | <a href="javascript:location.href='http://reddit.com/submit?url='+encodeURIComp onent(location.href)+'&#038;title='+encodeURIComponent(document.title)"><img  src=http://images.ientrymail.com/webpronews/reddit.png border=0>Reddit</a> | <a href="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(document.location.href)+'&#038;t='+encodeURIComponent(document.title)+ ' '"><img src=http://images.ientrymail.com/webpronews/furl-pic.png border=0> Furl</a></p>
<p>Bookmark WebProNews: <a href=http://www.webpronews.com><img src=http://images.ientrymail.com/webpronews/wpn-readit.jpg border=0></a></p>
<p>Christine Anderssen is the owner of Tailormade4you. After 20 years in the corporate world of IT management she decided to brave the new frontiers of Internet Entrepreneurship. Tailormade4you helps small and medium businesses with <a href="http://www.tm4y.co.za/">Web Services</a> in the form of <a href="http://www.internet-web-hosting.co.za/">Web Hosting</a> and <a href="http://www.tm4y.co.za/">Web Development</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/choosing-a-framework-for-web-development-2006-12/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is My Perl, CGI, MYSQL Site Obsolete?</title>
		<link>http://www.webpronews.com/is-my-perl-cgi-mysql-site-obsolete-2006-11</link>
		<comments>http://www.webpronews.com/is-my-perl-cgi-mysql-site-obsolete-2006-11#comments</comments>
		<pubDate>Wed, 22 Nov 2006 18:14:18 +0000</pubDate>
		<dc:creator>Chris Crum</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Forum]]></category>
		<category><![CDATA[language]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=33108</guid>
		<description><![CDATA[That is the question that one person asks in the <a href="http://www.webproworld.com/viewforum.php?f=17" class="bluelink">web programming discussion forum</a> at WebProWorld.
]]></description>
			<content:encoded><![CDATA[<p>That is the question that one person asks in the <a href="http://www.webproworld.com/viewforum.php?f=17" class="bluelink">web programming discussion forum</a> at WebProWorld.</p>
<p><b>Member ericjw says:</b></p>
<p><i>I am not a back-end person, but I try my hardest to understand. I have recently been considering a phase 2 design for our site. It&#8217;s a match-making style website in a niche industry. I had several programmers actually turn my work down because it was written in Perl. He then was telling me about re-engineering my site. </p>
<p>The site works fine, but it could really be improved with a usability expert and programmer to get the site to peak efficiency. </p>
<p>Do I have a dinoasar on my hands? What are the implications for future growth? Am I trying to try to grow my business on something that will be obsolete in several years? </i></p>
<p><b>These are all fair questions to which a few WebProWorld posters seemed eager to answer. Member stymiee replies:</b></p>
<p><i>Perl has been passed by PHP in terms of popularity for web-based software. But Perl itself is hardly obsolete. The odds are they just don&#8217;t know Perl and are trying to convince you to redo your site so they can get the job and the big payday. </p>
<p>You will find it a little more difficult to find Perl programmers then other more popular languages but you should still be able to do it without it costing you an arm and a leg. </i></p>
<p><b>Then came Kgun with a thoughtful answer (or opinion at least):</b></p>
<p><i>1. I have not coded a single line in Perl and do not know the language. I know PHP fairly well. </p>
<p>2. I have not coded a single line in C#, but have participated on seminars demonstrating C#. To me it looked like a simplified version of C++, the same as Java IMO. </p>
<p>3. C++, C#, Java, PHP and Perl are all C inspired languages. C++ is the OO language I know best. </p>
<p><b>My impression: </b></p>
<li>C# and Java are as stated above simplified versions of C++. Was C++ too difficult for mainstream developement? </li>
<li>PHP is becoming a fully OO language, has a large user community, a growing number of class libraries and extensions. </li>
<p>All languages have their pros and cons. I do not know Ajax. PHP is very flexible, the closest you can come to JavaScript with a <u>server side (scripting) language</u> in creating dynamic behaviour and user interaction on a web site as far as I know. May be Perl is equally flexible. The loose typing of PHP, its inbuild variables has its advantages. Because it is an interpreted (scripting) language it is more flexible (at runt time) than a compiled language. For some dynamic webpages, you need the flexibility that only Java Script can offer and the flexibility that PHP can offer as a serverside language. I would not have written an authentication system in JavaScript. Some people would perhaps not have written it in PHP. What about Perl? </p>
<p>Subjective facts: </p>
<li>If I should develope a number chruncing system for a financial institution today, I would definitely not use Fortran (I know fortran fairly well). But Fortran programs will continue to live for years in large financial institutions. </li>
<li>According to what I have skimmed and read about Perl, Perl is comparable to PHP in functionality. I think I have read that somebody mean that Perl is better on security related projects. I am not sure how relevant that argument is today if it is true, since you can improve security in PHP (e.g. session handling) by writing your own classes. </li>
<li>Time is sometimes a critical factor and you have to take a decision, I personally choose PHP as a comparable flexible interpreted language to Perl. </li>
<p>If the only tool you have is a hammer, soon everything starts to look like a nail. Who can hit the nail on the head? </p>
<p><b>Use the language that you master and your company / institution supports. Any better? </b></p>
<p>I am not PHP, but a little (Borland C++ Builder) religious <img src='http://www.webpronews.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  </p>
<p>Regarding security: If you are on an Apache server as many are, learn to tame that server, <u>especially how to use .htaccess to improve security on your site. </u></p>
<p>I think <a href="http://forums.garykeith.com/" class="bluelink">the owner of this forum</a>, know .htaccess better than most of us and look at the free downloads. He also knows ASP and the MS IIS web server. </p>
<p>Final word: The fine thing with OO PHP is that you can write a database connection class (API) that can be used independent of platform, be it MySQL, PostgreSQL &#8230; <u>If you do it correct, you need only change a single line in your code to change database platform.</u></i></p>
<p>Please <a href="http://www.webproworld.com/viewtopic.php?t=69759" class="bluelink">check out the thread</a> and add your two cents to the discussion or at the very least read what other members have added.</p>
<p>Tag: </p>
<p>Add to <a href="http://del.icio.us/post"  onclick="window.open('http://del.icio.us/post?v=4&#038;partner=wpn&#038;noui&#038;jump=close&#038;url='+encodeURIComponent(location.href)+'&#038;title='+encodeURIComponent(document.title),'delicious','toolbar=no,width=700,height=400'); return false;"   CLASS="printMailTop"><img  src=http://images.ientrymail.com/webpronews/delicious-pic.png border=0> Del.icio.us</a> | <a href="javascript:void window.open('http://digg.com/submit?phase=2&#038;url='+encodeURIComponent(window. location.href)+'&#038;ei=UTF-8','popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)"><img src=http://images.ientrymail.com/webpronews/digg-pic.png border=0> Digg</a> | <a href="javascript:location.href='http://reddit.com/submit?url='+encodeURIComp onent(location.href)+'&#038;title='+encodeURIComponent(document.title)"><img  src=http://images.ientrymail.com/webpronews/reddit.png border=0>Reddit</a> | <a href="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(document.location.href)+'&#038;t='+encodeURIComponent(document.title)+ ' '"><img src=http://images.ientrymail.com/webpronews/furl-pic.png border=0> Furl</a></p>
<p>Bookmark WebProNews: <a href=http://www.webpronews.com><img src=http://images.ientrymail.com/webpronews/wpn-readit.jpg border=0></a></p>
<p>Chris is a staff writer for  <a href="http://www.webpronews.com">WebProNews</a>. Visit WebProNews for the <a href="http://www.WebProNews.com">latest ebusiness news</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/is-my-perl-cgi-mysql-site-obsolete-2006-11/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Working With Fractions In PHP</title>
		<link>http://www.webpronews.com/working-with-fractions-in-php-2006-11</link>
		<comments>http://www.webpronews.com/working-with-fractions-in-php-2006-11#comments</comments>
		<pubDate>Wed, 15 Nov 2006 20:03:10 +0000</pubDate>
		<dc:creator>Bernard Peh</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.webpronews.com/?p=32913</guid>
		<description><![CDATA[There are a few ways to display fractions in the web. The most common way is just to add a slash between 2 numbers, like so "1/2".
]]></description>
			<content:encoded><![CDATA[<p>There are a few ways to display fractions in the web. The most common way is just to add a slash between 2 numbers, like so &#8220;1/2&#8243;.</p>
<p>There are also special HTML characters that we can make fractions look more professional. Eg. to display 1/2, we can use the HTML code . However, not many fractions are supported by HTML. So, you may be in trouble if you want to display 2/9 in HTML. </p>
<p> (* you may have problems viewing the fractions in the correct way because of the way this article is being formatted.)</p>
<p> A better way to display a fraction is probably to use the superscript and subscript tags. Using the superscript and subscript tag, my 2/9 will now look abit better. We can also use a &#8220;special slash&#8221; &#8260; between 2 numbers instead of a normal slash ( / ) to make the fraction look better. The fraction will now look like this: 2&#8260;9. Still not satisfied? With CSS, we can push the limit further. </p>
<p>If we define a css like this:</p>
<p><code>.fracNum, .fracDen {<br />
       font-size: 70%;<br />
}<br />
.fracNum { vertical-align: 0.5em; }<br />
.fracDen { vertical-align: -0.5em; }</code></p>
<p>and when implemented with the &#8216;sup&#8217; and &#8216;sub&#8217; tags:</p>
<p>The fraction will look even better</p>
<p>Converting Decimals To Fraction &#8211; A Real Example </p>
<p>I wrote a program that let people frame their pictures online. When I was halfway through, I was told that the program should support imperial measurements (inches). The problem with working in inches is that very few people would say my picture is 6.34 inch width by 9.82 inch height; Most people would say 6 and 3/8 inch by 9 and 3/8 height for example. </p>
<p>The biggest problem now is that the framing engine calculates everything in mm. Instead of rewritting the whole engine, I figured out that what I need is just an interface to convert mm to inches. So, if I pass 300mm into a function, it should return me 11 and 3/4 as the answer. Dividing 300mm by 1 inch (25.4mm) will leave me with a long decimal. It would be silly to try and display a fraction for a decimal like 0.1111. The function should be intelligent enough to round off the decimal to something that can be easily displayed as a fraction. For example, if I round off 0.1111 to 0.125, I can display the fraction as 1/8 instead of 1111/100000. Time is running short and I need a simple and sweet solution.</p>
<p><b>Implementation</b></p>
<p>I would like to go through snipplets of code with explaination first before revealing everything. Feel free to jump to the end of the page and copy the whole function if you just want to implement it in your website. The code is written in PHP. </p>
<p><b>Part 1: Extracting the decimal in inches. </b></p>
<p><code>define(INCH_TO_MM, 25.4);<br />
// 1 inch equals to 25.4mm<br />
$inch = $mm / INCH_TO_MM;<br />
$pWhole = explode('.',$inch);<br />
$pWhole = $pWhole[0];<br />
$pDecimal = $val-$pWhole;</code></p>
<p>The measurement in mm is first converted to inches(with decimal). The decimal is then isolated from the whole number and stored in a var call $pDecimal. Now, I need to store a list of all possible fractions with their mm equivalent in an array. I use intervals of 1/8 for the sake of simplicity.</p>
<p><b>Part 2: Rounding off to the closest inch interval.</b></p>
<p><code>$fractionOption = array();<br />
$fractionOption[0/8'] = 0<br />
$fractionOption[1/8'] = 0.125<br />
$fractionOption[1/4'] = 0.25<br />
$fractionOption[3/8'] = 0.375<br />
$fractionOption[1/2'] = 0.5<br />
$fractionOption[5/8'] = 0.625<br />
$fractionOption[3/4'] = 0.75<br />
$fractionOption[7/8'] = 0.875<br />
$fractionOption[8/8'] = 1</p>
<p>foreach ($fractionOption as $k => $v) {<br />
// Converted $pDecimal back to mm to perform calculation<br />
$tmpV[$k] = abs($pDecimal - $v);<br />
}</p>
<p>asort($tmpV,SORT_NUMERIC);</p>
<p>list($inch, $mm) = each($tmpV);</code></p>
<p>This is the most important step in the whole conversion process. The foreach loop creates a new array called $tmpV which stores the inch fraction as the key and the inch difference as the value. We will now sort $tmpV with the minimum mm&#8217; value at the top and the maximum mm&#8217; value at the bottom using the asort&#8217; function. We are extracting the first entry in the array because it stores the minimum mm&#8217; difference. As you can see, what we are trying to do here is to round $pDecimal off to the closest decimal value in the $fractionOption array (ie, 0.125, 0.25, 0.375..etc). </p>
<p>I can now safely extract the first key-value pair in $tmpV using the &#8216;list&#8217; function. The $inch var stores the inch representation that we want.</p>
<p><b>Part 3: Cleaning Up </b></p>
<p><code>$inch = ($inch == '0/8') ? '': $inch;<br />
// round off to nearest whole number if 8/8<br />
if ($inch == '8/8') {<br />
$inch = '';<br />
$pWhole++;<br />
}</code></p>
<p>We do not want to display the fraction if it is 0/8&#8242; or 8/8&#8242; because it is pretty much meaningless. However, if the fraction is 8/8&#8242;, we have to increase the whole number by 1.</p>
<p><b>Part 4: Adding some CSS </b></p>
<p><code>if ($inch != '') {<br />
$tFrac = explode('/',$inch);<br />
$fraction = "$tFrac[0]&#8260;$tFrac[1]";<br />
}<br />
else {<br />
$fraction = '';<br />
}<br />
return "$pWhole $fraction"; </code></p>
<p>Remember that we eliminated any fractions that are &#8217;0/8&#8242; or &#8217;8/8&#8242;? So we only need to process any fraction that falls within the range of &#8217;1/8&#8242; to &#8217;7/8&#8242;. By splitting the fractions into numerators and denominators, we can now apply our CSS technique mentioned above.</p>
<p><b>The Whole Thing </b></p>
<p>As promised, the full code is displayed below:</p>
<p><code>function mmToInch ($val) {</p>
<p>&nbsp;&nbsp;&nbsp;       $fractionOption = array();<br />
&nbsp;&nbsp;&nbsp;       $fractionOption['0/8'] = 0;<br />
&nbsp;&nbsp;&nbsp;       $fractionOption['1/8'] = 0.125;<br />
&nbsp;&nbsp;&nbsp;       $fractionOption['1/4'] = 0.25;<br />
&nbsp;&nbsp;&nbsp;       $fractionOption['3/8'] = 0.375;<br />
&nbsp;&nbsp;&nbsp;       $fractionOption['1/2'] = 0.5;<br />
&nbsp;&nbsp;&nbsp;       $fractionOption['5/8'] = 0.625;<br />
&nbsp;&nbsp;&nbsp;       $fractionOption['3/4'] = 0.75;<br />
&nbsp;&nbsp;&nbsp;       $fractionOption['7/8'] = 0.875;<br />
&nbsp;&nbsp;&nbsp;       $fractionOption['8/8'] = 1;<br />
&nbsp;&nbsp;&nbsp;       define(INCH_TO_MM, 25.4);</p>
<p>&nbsp;&nbsp;&nbsp;       $val = $val/INCH_TO_MM;<br />
&nbsp;&nbsp;&nbsp;       $pWhole = explode('.',$val);<br />
&nbsp;&nbsp;&nbsp;       $pWhole = $pWhole[0];<br />
&nbsp;&nbsp;&nbsp;       $pDecimal = $val-$pWhole;</p>
<p>&nbsp;&nbsp;&nbsp;       foreach ($fractionOption as $k => $v) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;              $tmpV[$k] = abs($pDecimal - $v);<br />
&nbsp;&nbsp;&nbsp;       }</p>
<p>&nbsp;&nbsp;&nbsp;       asort($tmpV,SORT_NUMERIC);<br />
&nbsp;&nbsp;&nbsp;       list($inch, $mm) = each($tmpV);</p>
<p>&nbsp;&nbsp;&nbsp;       // nullify pWhole and pFraction<br />
&nbsp;&nbsp;&nbsp;       $pWhole = ($pWhole == 0) ? '': $pWhole;<br />
&nbsp;&nbsp;&nbsp;       $inch = ($inch == '0/8') ? '': $inch;</p>
<p>&nbsp;&nbsp;&nbsp;       // round off to nearest whole number if 8/8<br />
&nbsp;&nbsp;&nbsp;       if ($inch == '8/8') {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;              $inch = '';<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;              $pWhole++;<br />
&nbsp;&nbsp;&nbsp;       }</p>
<p>&nbsp;&nbsp;&nbsp;       // strip inch and return fraction formatted in css<br />
&nbsp;&nbsp;&nbsp;      if ($inch != '') {<br />
&nbsp;&nbsp;&nbsp;&nbsp;             $tFrac = explode('/',$inch);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;              $fraction = "$tFrac[0]&#8260;$tFrac[1]";<br />
&nbsp;&nbsp;&nbsp;       }<br />
&nbsp;&nbsp;&nbsp;       else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;              $fraction = '';<br />
&nbsp;&nbsp;&nbsp;       }<br />
&nbsp;&nbsp;&nbsp;       return $pWhole.' '.$fraction;<br />
}</p>
<p>// testing<br />
echo "67.885 mm is equivalent to ".mmToInch(66.885)." inches";</code></p>
<p><b>Conclusion</b></p>
<p>I hope that the decimal to fraction conversion solution shown in this tutorial is straight forward and easy to implement. The script rounds off any decimal value to the closest one-eighth of an inch. If you want more accuracy, you can make your fraction interval smaller, for example 1/16 or 1/32&#8230;and so on. The logic used in this example can be easily applied to other programming languages. Feel free to try the online framing program at <a href="http://www.clubframeco.com/smartFramer.html" class="bluelink">http://www.clubframeco.com/smartFramer.html</a>. Make sure you select the inch option to see fractions in action.</p>
<p>Tag: </p>
<p>Add to <a href="http://del.icio.us/post"    onclick="window.open('http://del.icio.us/post?v=4&#038;partner=wpn&#038;noui&#038;jump=close&#038;url='+encodeURIComponent(location.href)+'&#038;title='+encodeURIComponent(document.t  itle),'delicious','toolbar=no,width=700,height=400'); return false;"   CLASS="printMailTop"><img    src=http://images.ientrymail.com/webpronews/delicious-pic.png border=0> Del.icio.us</a> | <a href="javascript:void   window.open('http://digg.com/submit?phase=2&#038;url='+encodeURIComponent(window.   location.href)+'&#038;ei=UTF-8','popup','width=520px,height=420px,status=0,location=0,resizable=1,scrollbars=1,left=100,top=50',0)"><img   src=http://images.ientrymail.com/webpronews/digg-pic.png border=0> Digg</a> | <a href="javascript:location.href='http://reddit.com/submit?url='+encodeURIComp   onent(location.href)+'&#038;title='+encodeURIComponent(document.title)"><img  src=http://images.ientrymail.com/webpronews/reddit.png border=0>Reddit</a> | <a   href="javascript:location.href='http://www.furl.net/storeIt.jsp?u='+encodeURIComponent(document.location.href)+'&#038;t='+encodeURIComponent(document.title)+ '   '"><img src=http://images.ientrymail.com/webpronews/furl-pic.png border=0> Furl</a></p>
<p>Bookmark WebProNews: <a href=http://www.webpronews.com><img src=http://images.ientrymail.com/webpronews/wpn-readit.jpg border=0></a></p>
<p>Bernard Peh is a Web Developer based in Melbourne. He works with experienced web designers and developers everyday, designing and developing commercial websites. He specialises mainly in SEO and PHP programming. Visit his blog at <a href="http://web-developer.sitecritic.net/">Melbourne PHP</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.webpronews.com/working-with-fractions-in-php-2006-11/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/41 queries in 0.022 seconds using memcached
Object Caching 657/777 objects using memcached

Served from: webpronews.com @ 2012-02-12 19:10:09 -->
