<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Devirtuoso</title>
	
	<link>http://www.devirtuoso.com</link>
	<description>Web Development Wickedness</description>
	<lastBuildDate>Thu, 02 Sep 2010 18:29:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Devirtuoso" /><feedburner:info uri="devirtuoso" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2FDevirtuoso" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FDevirtuoso" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2FDevirtuoso" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/Devirtuoso" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FDevirtuoso" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FDevirtuoso" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2FDevirtuoso" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2FDevirtuoso" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2FDevirtuoso" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2FDevirtuoso" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsalloy.com/?rss=http%3A%2F%2Ffeeds.feedburner.com%2FDevirtuoso" src="http://www.newsalloy.com/subrss3.gif">Subscribe with NewsAlloy</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2FDevirtuoso" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FDevirtuoso" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://download.attensa.com/app/get_attensa.html?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2FDevirtuoso" src="http://www.attensa.com/blogs/attensa/WindowsLiveWriter/BadgeredintoBadges_10C02/attensa_feed_button5.gif">Subscribe with Attensa for Outlook</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FDevirtuoso" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2FDevirtuoso" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.flurry.com/pushRssFeed.do?r=fb&amp;url=http%3A%2F%2Ffeeds.feedburner.com%2FDevirtuoso" src="http://www.flurry.com/images/flurry_rss_logo2.gif">Subscribe with Flurry</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2FDevirtuoso" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2FDevirtuoso" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><item>
		<title>Get Users Location With JQuery and Ajax</title>
		<link>http://feedproxy.google.com/~r/Devirtuoso/~3/ayZRFJxw1wQ/</link>
		<comments>http://www.devirtuoso.com/2010/09/get-users-location-with-jquery-and-ajax/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 18:29:15 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Front End Development]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[development Tools]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.devirtuoso.com/?p=1267</guid>
		<description><![CDATA[Ever needed to know where your user is from? Ever needed to do it with jQuery / Ajax? Today my friend you are in luck. This article will show you how to get the user&#8217;s location using jQuery, Ajax and the users IP. What are we building? Our application here isn&#8217;t overly complicated. We&#8217;re just [...]]]></description>
			<content:encoded><![CDATA[<p>Ever needed to know where your user is from? Ever needed to do it with jQuery / Ajax?  Today my friend you are in luck. This article will show you how to get the user&#8217;s location using jQuery, Ajax and the users IP.</p>
<p><span id="more-1267"></span></p>
<h3>What are we building?</h3>
<p>Our application here isn&#8217;t overly complicated.  We&#8217;re just going to tell our users where they&#8217;re from&#8230;incase they didn&#8217;t know <img src='http://www.devirtuoso.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="resources">
	 <a href="http://www.devirtuoso.com/Examples/UserLocation/userLocation.zip"class="Download" target="_blank">Download</a>  <a href="http://www.devirtuoso.com/Examples/UserLocation/"class="Example" target="_blank">Example</a>
</div>
<h3>How to do it</h3>
<p>We&#8217;ll be using a service from <a href="http://ipinfodb.com/ip_location_api.php" target="_blank">ipinfodb.com</a> to get this bad boy off the ground. They offer an api that allows you to pass in an IP and it spits out all the information we need.  So all we have to do is tap into this via jQuery and Ajax.</p>
<h3><span>Step 1: </span>Getting the user&#8217;s ip address</h3>
<p>First thing we need to do is pull in the user&#8217;s ip address.  We&#8217;re just going to use some PHP for this.</p>
<div class="codecolorer-container php " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br /></div></td><td><div class="php codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw2">&lt;?php</span><br />
<br />
<span class="co4">/**<br />
&nbsp;* Get users IP address.<br />
&nbsp;*<br />
&nbsp;* @return string ip address<br />
&nbsp;*/</span><br />
<span class="kw2">function</span> visitorIP<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
<span class="br0">&#123;</span> <br />
&nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span><a href="http://www.php.net/isset"><span class="kw3">isset</span></a><span class="br0">&#40;</span><span class="re0">$_SERVER</span><span class="br0">&#91;</span><span class="st_h">'HTTP_X_FORWARDED_FOR'</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$TheIp</span><span class="sy0">=</span><span class="re0">$_SERVER</span><span class="br0">&#91;</span><span class="st_h">'HTTP_X_FORWARDED_FOR'</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><span class="kw1">else</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$TheIp</span><span class="sy0">=</span><span class="re0">$_SERVER</span><span class="br0">&#91;</span><span class="st_h">'REMOTE_ADDR'</span><span class="br0">&#93;</span><span class="sy0">;</span> &nbsp;<br />
&nbsp; &nbsp; <span class="br0">&#125;</span> <br />
<br />
&nbsp; &nbsp; <span class="kw1">return</span> <a href="http://www.php.net/trim"><span class="kw3">trim</span></a><span class="br0">&#40;</span><span class="re0">$TheIp</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span><br />
<br />
<span class="re0">$ip</span> <span class="sy0">=</span> visitorIP<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
<br />
<span class="sy1">?&gt;</span></div></td></tr></tbody></table></div>
<h3><span>Step 2: </span>The Ajax</h3>
<p>Now that we have the users ip, we can use it in ipinfodb&#8217;s api.  We&#8217;ll just use jquery&#8217;s ajax to get the information.</p>
<div class="codecolorer-container javascript " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br /></div></td><td><div class="javascript codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="co1">// Build the URL to query...notice the php ip address at the end.</span><br />
<span class="kw2">var</span> url <span class="sy0">=</span> <span class="st0">&quot;http://ipinfodb.com/ip_query2.php?output=json&amp;callback=?&amp;ip=&lt;?php echo $ip ?&gt;&quot;</span><span class="sy0">;</span><br />
<br />
<span class="co1">// Utilize the JQuery's JSON function</span><br />
$.<span class="me1">getJSON</span><span class="br0">&#40;</span>url<span class="sy0">,</span> <span class="kw2">function</span><span class="br0">&#40;</span>data<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="co1">//Make sure it processed it okay.</span><br />
&nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>data.<span class="me1">Locations</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span>.<span class="kw3">Status</span> <span class="sy0">==</span> <span class="st0">&quot;OK&quot;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Parse the JSON</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> location <span class="sy0">=</span> data.<span class="me1">Locations</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> city <span class="sy0">=</span> location.<span class="me1">City</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> country <span class="sy0">=</span> location.<span class="me1">CountryName</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> region <span class="sy0">=</span> location.<span class="me1">RegionName</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> output <span class="sy0">=</span> <span class="st0">&quot;Your location is: &quot;</span><span class="sy0">+</span> city<span class="sy0">+</span> <span class="st0">&quot;, &quot;</span><span class="sy0">+</span>region<span class="sy0">+</span> <span class="st0">&quot; &quot;</span><span class="sy0">+</span> country<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//OUTPUT</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; $<span class="br0">&#40;</span><span class="st0">'body'</span><span class="br0">&#41;</span>.<span class="me1">append</span><span class="br0">&#40;</span>output<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <br />
<span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></div></td></tr></tbody></table></div>
<p>The magic lies in the GET variables passed with the ipinfodb&#8217;s url. </p>
<p>
	<strong>output = json</strong> &#8211; specifies which format we want&#8230;in this case JSON</p>
<p>	<strong>callback=?</strong> &#8211; this is for a javascript callback. Since we&#8217;re using jquery&#8217;s callback we gave this a value of ?. Alternatively you could pass in a javascript function name and it would call the function for you.</p>
<p>	<strong>ip = (ip address)</strong> &#8211; is the user&#8217;s ip that you want to look up the location.
</p>
<p>The JSON it returns will look something like:</p>
<div class="codecolorer-container javascript " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="javascript codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="br0">&#123;</span><br />
&nbsp; <span class="st0">&quot;Ip&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;74.125.45.100&quot;</span><span class="sy0">,</span><br />
&nbsp; <span class="st0">&quot;Status&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;OK&quot;</span><span class="sy0">,</span><br />
&nbsp; <span class="st0">&quot;CountryCode&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;US&quot;</span><span class="sy0">,</span><br />
&nbsp; <span class="st0">&quot;CountryName&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;United States&quot;</span><span class="sy0">,</span><br />
&nbsp; <span class="st0">&quot;RegionCode&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;06&quot;</span><span class="sy0">,</span><br />
&nbsp; <span class="st0">&quot;RegionName&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;California&quot;</span><span class="sy0">,</span><br />
&nbsp; <span class="st0">&quot;City&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;Mountain View&quot;</span><span class="sy0">,</span><br />
&nbsp; <span class="st0">&quot;ZipPostalCode&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;94043&quot;</span><span class="sy0">,</span><br />
&nbsp; <span class="st0">&quot;Latitude&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;37.4192&quot;</span><span class="sy0">,</span><br />
&nbsp; <span class="st0">&quot;Longitude&quot;</span> <span class="sy0">:</span> <span class="st0">&quot;-122.057&quot;</span><br />
<span class="br0">&#125;</span></div></td></tr></tbody></table></div>
<p>Notice that it include the latitude and longitude.  This is particularly handy with google maps <img src='http://www.devirtuoso.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Hopefully this will help you out.  I know I&#8217;ve used it numerous times. It&#8217;s a simple way to personalize your site.  Enjoy.</p>
<div class="resources">
	 <a href="http://www.devirtuoso.com/Examples/UserLocation/userLocation.zip"class="Download" target="_blank">Download</a>  <a href="http://www.devirtuoso.com/Examples/UserLocation/"class="Example" target="_blank">Example</a>
</div>

<p><a href="http://feedads.g.doubleclick.net/~a/Atw3zYVqVr1srM376zb3JR492r4/0/da"><img src="http://feedads.g.doubleclick.net/~a/Atw3zYVqVr1srM376zb3JR492r4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Atw3zYVqVr1srM376zb3JR492r4/1/da"><img src="http://feedads.g.doubleclick.net/~a/Atw3zYVqVr1srM376zb3JR492r4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=ayZRFJxw1wQ:Hocyt9Z2Ut4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=ayZRFJxw1wQ:Hocyt9Z2Ut4:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=ayZRFJxw1wQ:Hocyt9Z2Ut4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=ayZRFJxw1wQ:Hocyt9Z2Ut4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=ayZRFJxw1wQ:Hocyt9Z2Ut4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=ayZRFJxw1wQ:Hocyt9Z2Ut4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=ayZRFJxw1wQ:Hocyt9Z2Ut4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=ayZRFJxw1wQ:Hocyt9Z2Ut4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=ayZRFJxw1wQ:Hocyt9Z2Ut4:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devirtuoso.com/2010/09/get-users-location-with-jquery-and-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.devirtuoso.com/2010/09/get-users-location-with-jquery-and-ajax/</feedburner:origLink></item>
		<item>
		<title>Quick Tip: Validate Email Addresses with PHP</title>
		<link>http://feedproxy.google.com/~r/Devirtuoso/~3/9idFnGNSfEE/</link>
		<comments>http://www.devirtuoso.com/2010/08/quick-tip-validate-email-addresses-with-php/#comments</comments>
		<pubDate>Mon, 30 Aug 2010 13:20:27 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Back End]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.devirtuoso.com/?p=1259</guid>
		<description><![CDATA[Email validation is a common task that most developers have to deal with on a regular basis. Far too often the complex approach is taken (regular expressions), when PHP 5 has a super simple way to validate / sanitize your email string. Filtering Variables the PHP 5 Way So what is the quick method to [...]]]></description>
			<content:encoded><![CDATA[<p>Email validation is a common task that most developers have to deal with on a regular basis.  Far too often the complex approach is taken (regular expressions), when PHP 5 has a super simple way to validate / sanitize your email string.</p>
<p><span id="more-1259"></span></p>
<h2>Filtering Variables the PHP 5 Way</h2>
<p>So what is the quick method to validating emails? The function called filter_var(). This function allows you to run your variable through a filter that you specify, and can either validate the variable, or return a sanitized string depending on the filter you choose.</p>
<p>What does this look like&#8230;</p>
<div class="codecolorer-container php " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="php codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw2">&lt;?php</span><br />
<span class="co1">//Bad Email...</span><br />
<span class="re0">$badEmail</span> <span class="sy0">=</span> <span class="st0">&quot;bad@email&quot;</span><span class="sy0">;</span><br />
<br />
<span class="co1">//Run the email through an email validation filter.</span><br />
<span class="kw1">if</span><span class="br0">&#40;</span> <span class="sy0">!</span>filter_var<span class="br0">&#40;</span><span class="re0">$badEmail</span><span class="sy0">,</span> FILTER_VALIDATE_EMAIL<span class="br0">&#41;</span> <span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;Email is no good.&quot;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span><span class="kw1">else</span><span class="br0">&#123;</span><br />
&nbsp; <a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="st0">&quot;Nice email.&quot;</span><span class="sy0">;</span><br />
<span class="br0">&#125;</span><br />
<br />
<span class="co1">//Result - Email is no good.</span><br />
<span class="sy1">?&gt;</span></div></td></tr></tbody></table></div>
<p>Alternatively you can use the sanitize filter, and it will remove any characters that aren&#8217;t valid.</p>
<div class="codecolorer-container php " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br /></div></td><td><div class="php codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw2">&lt;?php</span><br />
<span class="co1">//Crappy email.</span><br />
<span class="re0">$var</span><span class="sy0">=</span><span class="st0">&quot;bad<span class="es6">%%</span>@em\#ail.com&quot;</span><span class="sy0">;</span><br />
<br />
<span class="co1">//Runs email through a sanitize filter</span><br />
<a href="http://www.php.net/print"><span class="kw3">print</span></a> filter_var<span class="br0">&#40;</span><span class="re0">$var</span><span class="sy0">,</span> FILTER_SANITIZE_EMAIL<span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
<span class="co1">//Result - bad@email.com</span><br />
<span class="sy1">?&gt;</span></div></td></tr></tbody></table></div>
<p>As you can see these are super easy. You no longer have to worry about your regular expressions sucking.  Php has you covered.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/tH1XPcSkdLpeVL_d24iyutPpKlo/0/da"><img src="http://feedads.g.doubleclick.net/~a/tH1XPcSkdLpeVL_d24iyutPpKlo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/tH1XPcSkdLpeVL_d24iyutPpKlo/1/da"><img src="http://feedads.g.doubleclick.net/~a/tH1XPcSkdLpeVL_d24iyutPpKlo/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=9idFnGNSfEE:TG0Duo0WHQg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=9idFnGNSfEE:TG0Duo0WHQg:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=9idFnGNSfEE:TG0Duo0WHQg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=9idFnGNSfEE:TG0Duo0WHQg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=9idFnGNSfEE:TG0Duo0WHQg:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=9idFnGNSfEE:TG0Duo0WHQg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=9idFnGNSfEE:TG0Duo0WHQg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=9idFnGNSfEE:TG0Duo0WHQg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=9idFnGNSfEE:TG0Duo0WHQg:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devirtuoso.com/2010/08/quick-tip-validate-email-addresses-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.devirtuoso.com/2010/08/quick-tip-validate-email-addresses-with-php/</feedburner:origLink></item>
		<item>
		<title>How to Make a Jquery Back to Top Link</title>
		<link>http://feedproxy.google.com/~r/Devirtuoso/~3/BkEjAbX2fH0/</link>
		<comments>http://www.devirtuoso.com/2010/08/how-to-make-a-jquery-back-to-top-link/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 13:39:35 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Front End Development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.devirtuoso.com/?p=1253</guid>
		<description><![CDATA[It&#8217;s the small things in a website that makes your clients go OOOHhhhh&#8230;  Things like animating the scroll when someone clicks a back to top link can give you some serious brownie points.  Considering it&#8217;s online a couple of extra lines of code it&#8217;s well worth it. What We are Building Simply put, we&#8217;re going [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s the small things in a website that makes your clients go OOOHhhhh&#8230;  Things like animating the scroll when someone clicks a back to top link can give you some serious brownie points.  Considering it&#8217;s online a couple of extra lines of code it&#8217;s well worth it.</p>
<p><span id="more-1253"></span></p>
<h2>What We are Building</h2>
<p>Simply put, we&#8217;re going to create a looooong HTML page that has back to top links through out.  When you click on one of these links it will scroll to the top in an awesome animated fashion.</p>
<div class="resources">
	 <a href="http://www.devirtuoso.com/Examples/BackToTop/backToTop.zip"class="Download" target="_blank">Download</a>  <a href="http://www.devirtuoso.com/Examples/BackToTop/"class="Example" target="_blank">Example</a>
</div>
<h2><span>Step 1:</span> The Content</h2>
<p>This should be pretty straight forward, you&#8217;re site should already have content, but in the case of an example we have to get some, and there has to be enough to scroll.  I just took mine from the w3 standards website&#8230;as it should be already HTML compliant <img src='http://www.devirtuoso.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />   Now throughout you just need to add some back to top links with anchor tags to some element at the top of the page. In our case we have a div with an id of top.  So our anchor tag should look something like&#8230;</p>
<div class="codecolorer-container html4strict " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="sc2">&lt;<a href="http://december.com/html/4/element/a.html"><span class="kw2">a</span></a> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">&quot;#top&quot;</span> <span class="kw3">class</span><span class="sy0">=</span><span class="st0">&quot;backToTop&quot;</span>&gt;</span>Back to top<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/a.html"><span class="kw2">a</span></a>&gt;</span></div></td></tr></tbody></table></div>
<h2><span>Step 2:</span> The jQuery</h2>
<p>At the bottom of your html just add the following code.</p>
<div class="codecolorer-container html4strict " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br /></div></td><td><div class="html4strict codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="sc-1">&lt;!-- Include jQuery --&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a> <span class="kw3">src</span><span class="sy0">=</span><span class="st0">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span> <span class="kw3">charset</span><span class="sy0">=</span><span class="st0">&quot;utf-8&quot;</span>&gt;&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a>&gt;</span><br />
<br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span> <span class="kw3">charset</span><span class="sy0">=</span><span class="st0">&quot;utf-8&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; //Click event handler for any anchor that has an href that ends in top<br />
&nbsp; &nbsp; &nbsp; $('a[href]$=&quot;top&quot;').click(function() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; //Animates scroll to the top of the page...and take 1 second to do it.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $('html, body').animate({ scrollTop:0 }, '1000');<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; //return false to prevent the default action of the anchor tag when clicked.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return false;<br />
&nbsp;<br />
&nbsp; &nbsp; &nbsp; });<br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>Nothing too special here.  Just a click event for the back to top links that animates the scroll.</p>
<p>That&#8217;s all there is to it. Enjoy making your site that much cooler. </p>
<div class="resources">
	 <a href="http://www.devirtuoso.com/Examples/BackToTop/backToTop.zip"class="Download" target="_blank">Download</a>  <a href="http://www.devirtuoso.com/Examples/BackToTop/"class="Example" target="_blank">Example</a>
</div>

<p><a href="http://feedads.g.doubleclick.net/~a/EVkIeDlKpetZdO12geY3K7xce7g/0/da"><img src="http://feedads.g.doubleclick.net/~a/EVkIeDlKpetZdO12geY3K7xce7g/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/EVkIeDlKpetZdO12geY3K7xce7g/1/da"><img src="http://feedads.g.doubleclick.net/~a/EVkIeDlKpetZdO12geY3K7xce7g/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=BkEjAbX2fH0:dhGCjNJYWWk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=BkEjAbX2fH0:dhGCjNJYWWk:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=BkEjAbX2fH0:dhGCjNJYWWk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=BkEjAbX2fH0:dhGCjNJYWWk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=BkEjAbX2fH0:dhGCjNJYWWk:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=BkEjAbX2fH0:dhGCjNJYWWk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=BkEjAbX2fH0:dhGCjNJYWWk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=BkEjAbX2fH0:dhGCjNJYWWk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=BkEjAbX2fH0:dhGCjNJYWWk:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devirtuoso.com/2010/08/how-to-make-a-jquery-back-to-top-link/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.devirtuoso.com/2010/08/how-to-make-a-jquery-back-to-top-link/</feedburner:origLink></item>
		<item>
		<title>Adding a Twitter Tweet Box to your site.</title>
		<link>http://feedproxy.google.com/~r/Devirtuoso/~3/My_vwtulgGU/</link>
		<comments>http://www.devirtuoso.com/2010/08/adding-a-twitter-tweet-box-to-your-site/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 13:15:01 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Front End Development]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[development Tools]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.devirtuoso.com/?p=1237</guid>
		<description><![CDATA[It&#8217;s always good practice to make things easy for your users.  So why not make it easier for them to update their tweet while visiting your site.  This article will show you how to implrement Twitter&#8217;s tweet box on your site. What we&#8217;re making Twitter&#8217;s @Anywhere allows you to integrate twitter into your site with [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s always good practice to make things easy for your users.  So why not make it easier for them to update their tweet while visiting your site.  This article will show you how to implrement Twitter&#8217;s tweet box on your site.</p>
<p><span id="more-1237"></span></p>
<h2>What we&#8217;re making</h2>
<p><a href="http://dev.twitter.com/anywhere" target="_blank">Twitter&#8217;s @Anywhere </a>allows you to integrate twitter into your site with little to no trouble.  So we&#8217;re going to take advantage of that and integrate a tweet box for our users to tweet to their tweeps.  (Everything is cooler when you put a &#8220;tw&#8221; in front of it)</p>
<p>Here is an example of what we are making&#8230;.WARNING THIS WILL POST TO YOUR TWITTER PAGE&#8230;so keep love notes about <a href="http://i281.photobucket.com/albums/kk218/sunshinelikessomeone/JustinBieber.png" target="_blank">Justin Bieber</a> to a minimum.</p>
<div class="resources">
	 <a href="http://www.devirtuoso.com/Examples/TwitterBox/tweet.zip"class="Download" target="_blank">Download</a>  <a href="http://www.devirtuoso.com/Examples/TwitterBox/"class="Example" target="_blank">Example</a>
</div>
<p>&#160;</p>
<h2><span>Step 1: </span>Get the Key</h2>
<p>The first thing we need to do is grab an application key from Twitter&#8230;same sort of idea as Facebook, you need it to add any widgets onto your site.</p>
<p>You can get your key at <a href="http://dev.twitter.com/anywhere" target="_blank">Twitter @Anywhere Dev site</a>, just click on start using it now.</p>
<p><img class="alignnone size-full wp-image-1240" title="imgTwitterAnywhere" src="http://www.devirtuoso.com/wp-content/uploads/2010/08/imgTwitterAnywhere.jpg" alt="Twitter @Anywhere" width="400" height="297" /></p>
<p>This will ask you to login if you&#8217;re not already.  After that you&#8217;ll have a form to fill out&#8230;fun.  For what we&#8217;re doing you don&#8217;t have to fill out much.  Give an name to the application, your website url, and be sure to give READ WRITE access.</p>
<p><img class="alignnone size-full wp-image-1241" title="imgTwitterAppForm" src="http://www.devirtuoso.com/wp-content/uploads/2010/08/imgTwitterAppForm.jpg" alt="Twitter App Form" width="400" height="410" /></p>
<p>At the point in writing this I got an error message after I submitted.  If you did too, not to worry it still created your application.  If you click on the &#8220;View Your Applications&#8221; you&#8217;ll see your newly created application right there. YAY.  Click on the app and you&#8217;ll see your API Key right at the top.</p>
<h2><span>Step 2: </span>The JavaScript</h2>
<p>This is the easy part.  All you have to do is cut and paste.  Head to the <a href="http://dev.twitter.com/anywhere/begin" target="_blank">Twitter documentation page</a>. At the top of the page you&#8217;ll find the javascript you&#8217;ll need to include in your html document.  Be sure to put your brand spankin&#8217; new API key in there.</p>
<div class="codecolorer-container html4strict " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="sc2">&lt;<a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a> <span class="kw3">src</span><span class="sy0">=</span><span class="st0">&quot;http://platform.twitter.com/anywhere.js?id=YOUR_API_KEY&amp;v=1&quot;</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span>&gt;&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>On the same documentation page, about half way down you&#8217;ll also find the code for the tweet box, copy and paste that code into your html doc and you&#8217;re ready to go.</p>
<div class="codecolorer-container html4strict " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br /></div></td><td><div class="html4strict codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="sc2">&lt;<a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;tbox&quot;</span>&gt;&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a>&gt;</span><br />
&nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span>&gt;</span><br />
<br />
&nbsp; &nbsp; &nbsp; twttr.anywhere(function (T) {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; T(&quot;#tbox&quot;).tweetBox({<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; height: 100,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width: 400,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; defaultContent: &quot;<span class="sc2">&lt;YOUR DEFAULT TWEETBOX <span class="kw3">CONTENT</span> HERE&gt;</span>&quot;<br />
&nbsp; &nbsp; &nbsp; &nbsp; });<br />
<br />
&nbsp; &nbsp; &nbsp; });<br />
<br />
&nbsp; &nbsp; <span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>That&#8217;s it!  As far as API&#8217;s go I&#8217;ve always loved Twitter. Facebook has always been a pain up until recently.  So enjoy, and be sure to experiment with all the Twitter goodness that @Anywhere has to offer.</p>
<div class="resources">
	 <a href="http://www.devirtuoso.com/Examples/TwitterBox/tweet.zip"class="Download" target="_blank">Download</a>  <a href="http://www.devirtuoso.com/Examples/TwitterBox/"class="Example" target="_blank">Example</a>
</div>
<p>&#160;</p>

<p><a href="http://feedads.g.doubleclick.net/~a/JV43dIOskG1318N5A-YrO_Z6CHc/0/da"><img src="http://feedads.g.doubleclick.net/~a/JV43dIOskG1318N5A-YrO_Z6CHc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/JV43dIOskG1318N5A-YrO_Z6CHc/1/da"><img src="http://feedads.g.doubleclick.net/~a/JV43dIOskG1318N5A-YrO_Z6CHc/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=My_vwtulgGU:rmdc50z0src:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=My_vwtulgGU:rmdc50z0src:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=My_vwtulgGU:rmdc50z0src:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=My_vwtulgGU:rmdc50z0src:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=My_vwtulgGU:rmdc50z0src:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=My_vwtulgGU:rmdc50z0src:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=My_vwtulgGU:rmdc50z0src:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=My_vwtulgGU:rmdc50z0src:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=My_vwtulgGU:rmdc50z0src:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devirtuoso.com/2010/08/adding-a-twitter-tweet-box-to-your-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.devirtuoso.com/2010/08/adding-a-twitter-tweet-box-to-your-site/</feedburner:origLink></item>
		<item>
		<title>20 Mobile Device Emulators</title>
		<link>http://feedproxy.google.com/~r/Devirtuoso/~3/nyrZVp9lFS4/</link>
		<comments>http://www.devirtuoso.com/2010/08/20-mobile-device-emulators/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 15:52:21 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[development Tools]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.devirtuoso.com/?p=1231</guid>
		<description><![CDATA[Mobile websites are becoming more popular, and you need a way to test everything on different phones.  Here is a list of emulators that will get you started. The Emulators Android emulator Blackberry emulator Dot Mobi emulator Firefox Mobile emulator iPhone / iPad / iPod Touch emulator Klondike WML emulator LG emulator Microsoft Devices emulator [...]]]></description>
			<content:encoded><![CDATA[<p>Mobile websites are becoming more popular, and you need a way to test everything on different phones.  Here is a list of emulators that will get you started.</p>
<p><span id="more-1231"></span></p>
<h3>The Emulators</h3>
<ul>
<li><a href="http://developer.android.com/guide/developing/tools/emulator.html">Android emulator</a></li>
<li><a href="http://www.blackberry.com/developers/downloads/simulators/">Blackberry emulator</a></li>
<li><a href="http://mtld.mobi/emulator.php">Dot Mobi emulator</a></li>
<li><a href="http://www.mozilla.com/en-US/mobile/platforms/">Firefox Mobile emulator</a></li>
<li><a href="http://www.puresimstudios.com/ibbdemo/">iPhone / iPad / iPod Touch emulator</a></li>
<li><a href="http://www.simtel.net/product/download/id/53647">Klondike WML emulator</a></li>
<li><a href="http://developer.lgmobile.com/lge.mdn.tnd.RetrieveDocAndTools.dev?objectType=T#1">LG emulator</a></li>
<li><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=dd567053-f231-4a64-a648-fea5e7061303">Microsoft Devices emulator</a></li>
<li><a href="http://developer.motorola.com/docstools/sdks/archive/c975ADK/">Motorola emulator</a></li>
<li><a href="http://www.mozilla.org/projects/fennec/1.0a1/releasenotes/">Mozilla Fennec emulator</a></li>
<li><a href="http://www.access-company.com/products/internet_appliances/netfrontsdk/">NetFront emulator</a></li>
<li><a href="http://www.forum.nokia.com/info/sw.nokia.com/id/db2c69a2-4066-46ff-81c4-caac8872a7c5/NMB40_install.zip.html">Nokia emulator</a></li>
<li><a href="http://wapreview.com/blog/?p=3733">OpenWave emulator</a> (archive)</li>
<li><a href="http://www.opera.com/mobile/demo/">Opera Mini emulator</a></li>
<li><a href="http://informatico.altervista.org/netvibes/operamini.php">Opera Mobile emulator</a></li>
<li><a href="http://developer.palm.com/index.php?option=com_content&amp;view=article&amp;id=1744">Palm emulator</a></li>
<li><a href="http://www.genuitec.com/mobile/download.html">Palm Pre / iPhone emulator</a></li>
<li><a href="http://innovator.samsungmobile.com/platform.main.do?platformId=3">Samsung Java emulator</a></li>
<li><a href="http://innovator.samsungmobile.com/bbs/lab/labplatform.do">Samsung Platform emulator</a></li>
<li><a href="http://msdn.microsoft.com/en-gb/windowsmobile/bb264327.aspx">Windows Mobile emulator</a></li>
</ul>
<p>I know I am always looking for emulators, so hopefully this list will help you out.</p>
<p><a href="http://sixrevisions.com/" target="_blank">Six Revisions</a> has a great article on <a href="http://sixrevisions.com/web-development/mobile-web-design-best-practices/" target="_blank">best practices for mobile</a>.  Be sure to check it out, that is where I got this list from.  Super helpful. Thanks!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/XVSS7nQVt1SQuxG7SQ9f6OoUQVo/0/da"><img src="http://feedads.g.doubleclick.net/~a/XVSS7nQVt1SQuxG7SQ9f6OoUQVo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/XVSS7nQVt1SQuxG7SQ9f6OoUQVo/1/da"><img src="http://feedads.g.doubleclick.net/~a/XVSS7nQVt1SQuxG7SQ9f6OoUQVo/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=nyrZVp9lFS4:lbjqGzqxtrI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=nyrZVp9lFS4:lbjqGzqxtrI:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=nyrZVp9lFS4:lbjqGzqxtrI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=nyrZVp9lFS4:lbjqGzqxtrI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=nyrZVp9lFS4:lbjqGzqxtrI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=nyrZVp9lFS4:lbjqGzqxtrI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=nyrZVp9lFS4:lbjqGzqxtrI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=nyrZVp9lFS4:lbjqGzqxtrI:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=nyrZVp9lFS4:lbjqGzqxtrI:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devirtuoso.com/2010/08/20-mobile-device-emulators/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.devirtuoso.com/2010/08/20-mobile-device-emulators/</feedburner:origLink></item>
		<item>
		<title>Quick Tip: Using Google Fonts for your website</title>
		<link>http://feedproxy.google.com/~r/Devirtuoso/~3/NoBSU4jGkag/</link>
		<comments>http://www.devirtuoso.com/2010/08/quick-tip-using-google-fonts-for-your-website/#comments</comments>
		<pubDate>Tue, 17 Aug 2010 17:08:15 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Front End Development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[fonts]]></category>
		<category><![CDATA[web design]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.devirtuoso.com/?p=1221</guid>
		<description><![CDATA[Google has offered yet another fantastic service that allows you to add new free fonts to your web pages. This article will give you a quick run down on how to do this. .content h2 { font-family: 'Reenie Beanie', arial, serif !important; font-size:2.2em !important; } Google Font Directory Tired of using the same ol&#8217; fonts [...]]]></description>
			<content:encoded><![CDATA[<p>Google has offered yet another fantastic service that allows you to add new free fonts to your web pages. This article will give you a quick run down on how to do this.</p>
<p><span id="more-1221"></span></p>
<link href='http://fonts.googleapis.com/css?family=Reenie+Beanie' rel='stylesheet' type='text/css'>
<style type="text/css" media="screen">
	.content h2 { 
		font-family: 'Reenie Beanie', arial, serif !important; 
		font-size:2.2em !important;
		}
</style>
<h2>Google Font Directory</h2>
<p>Tired of using the same ol&#8217; fonts for every web page?  I know I am. Google offers a directory of fonts that you can quickly add to your website with 2 lines of code.  Doesn&#8217;t get much easier.</p>
<h2><span>Step 1:</span> Select a Font</h2>
<p>Visit the <a href="http://code.google.com/webfonts" target="blank">Google Font Directory</a> and pick out a font.  There isn&#8217;t a huge list, but what they do have is nice and clean.</p>
<h2><span>Step 2:</span> Get the Code</h2>
<p>After you click on the font you want, just click on &#8220;Get the code&#8221;. Google offers up 2 lines of code.  One a CSS include for the font you selected, and the CSS to implement it.</p>
<h2><span>Step 3:</span> Use the Code</h2>
<p>Copy and paste the code into your document.  El finito.  This is the code I used for the headers in this article.</p>
<div class="codecolorer-container html4strict " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="html4strict codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="sc2">&lt;<a href="http://december.com/html/4/element/link.html"><span class="kw2">link</span></a> <span class="kw3">href</span><span class="sy0">=</span><span class="st0">'http://fonts.googleapis.com/css?family=Reenie+Beanie'</span> <span class="kw3">rel</span><span class="sy0">=</span><span class="st0">'stylesheet'</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">'text/css'</span>&gt;</span><br />
<br />
&nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/style.html"><span class="kw2">style</span></a> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/css&quot;</span> <span class="kw3">media</span><span class="sy0">=</span><span class="st0">&quot;screen&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; h2 { font-family: 'Reenie Beanie', arial, serif; }<br />
&nbsp; &nbsp; <span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/style.html"><span class="kw2">style</span></a>&gt;</span></div></td></tr></tbody></table></div>

<p><a href="http://feedads.g.doubleclick.net/~a/f6uVr2nV7LyWQNFoX99U0GSsSqM/0/da"><img src="http://feedads.g.doubleclick.net/~a/f6uVr2nV7LyWQNFoX99U0GSsSqM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/f6uVr2nV7LyWQNFoX99U0GSsSqM/1/da"><img src="http://feedads.g.doubleclick.net/~a/f6uVr2nV7LyWQNFoX99U0GSsSqM/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=NoBSU4jGkag:0NzXDADBCXE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=NoBSU4jGkag:0NzXDADBCXE:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=NoBSU4jGkag:0NzXDADBCXE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=NoBSU4jGkag:0NzXDADBCXE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=NoBSU4jGkag:0NzXDADBCXE:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=NoBSU4jGkag:0NzXDADBCXE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=NoBSU4jGkag:0NzXDADBCXE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=NoBSU4jGkag:0NzXDADBCXE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=NoBSU4jGkag:0NzXDADBCXE:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devirtuoso.com/2010/08/quick-tip-using-google-fonts-for-your-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.devirtuoso.com/2010/08/quick-tip-using-google-fonts-for-your-website/</feedburner:origLink></item>
		<item>
		<title>Reading Excel Documents with PHP and Ajax</title>
		<link>http://feedproxy.google.com/~r/Devirtuoso/~3/6Pi2l4rYqUA/</link>
		<comments>http://www.devirtuoso.com/2010/08/reading-excel-documents-with-php-and-ajax/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 20:00:42 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[Back End]]></category>
		<category><![CDATA[Front End Development]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.devirtuoso.com/?p=1202</guid>
		<description><![CDATA[Every wanted to display information from an excel document on a website? Ever wanted to do it asynchronously? Today is your lucky day. This article will show you how to load in an excel document using php, jquery and ajax. What are we building? We are going to build a page that pulls in each [...]]]></description>
			<content:encoded><![CDATA[<p>Every wanted to display information from an excel document on a website? Ever wanted to do it asynchronously? Today is your lucky day. This article will show you how to load in an excel document using php, jquery and ajax.</p>
<p><span id="more-1202"></span></p>
<h2>What are we building?</h2>
<p>We are going to build a page that pulls in each row from you excel document and styles it to our liking.  We&#8217;ll be doing this by building a php page that spits out json.  Then with the magic of jQuery we&#8217;ll pull that information in and parse it to our liking.</p>
<div class="resources">
	 <a href="http://www.devirtuoso.com/Examples/Excel-Ajax/excel.zip"class="Download" target="_blank">Download</a>  <a href="http://www.devirtuoso.com/Examples/Excel-Ajax/"class="Example" target="_blank">Example</a>
</div>
<p><a href="http://www.devirtuoso.com/Examples/Excel-Ajax/" target="_blank"><img src="http://www.devirtuoso.com/wp-content/uploads/2010/08/imgExcelAjax.jpg" alt="Excel Ajax" /></a></p>
<h2>Required Tools</h2>
<p>We&#8217;ll be using a pre-made php class to handle reading of our excel file.  The one I used is call <a href="http://code.google.com/p/php-excel-reader/" title="PHP-Excel-Reader" target="_blank">php-excel-reader</a>. You&#8217;ll also need an excel document to read from.  I&#8217;ll be using a list of hair salons in Canada&#8230;.don&#8217;t ask, it was for a project I was working on.  It has all the contact info for each business.  Besides that you should be good to go.</p>
<h2>Extending Class to Meet Our Requirements</h2>
<p>The php excel reader class isn&#8217;t prefect for our needs.  We need some sort of method to take each cell and dump it into an array. Also, the class doesn&#8217;t handle phone number formatting very well.  So what are we going to do?  Create our own class and extend the excel reader class with our new methods&#8230;fun!  Why not just edit the original class? It&#8217;s generally bad practice to hack the core. Any mistakes we&#8217;ll be making will be contained within our new file.</p>
<p>First thing is first. We need to create our class.</p>
<p><strong>Our Class -> ExcelReader.php</strong></p>
<div class="codecolorer-container php " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br /></div></td><td><div class="php codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw2">&lt;?php</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Load in original excel reader class</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">require_once</span> <span class="st_h">'excel_reader2.php'</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co4">/**<br />
&nbsp; &nbsp; &nbsp; &nbsp; * Adds Function to excel reader class<br />
&nbsp; &nbsp; &nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">class</span> ExcelReader <span class="kw2">extends</span> Spreadsheet_Excel_Reader<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="coMULTI">/*<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; This method will spit out an array<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; of all our excel document rows.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">function</span> dumptoarray<span class="br0">&#40;</span><span class="re0">$sheet</span><span class="sy0">=</span><span class="nu0">0</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co2"># code...</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="coMULTI">/*<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; This method will overwrite a method in<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; the Spreadsheet_Excel_Reader. &nbsp;We will<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; add the functionality to handle phone<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; number formatting.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">function</span> _format_value<span class="br0">&#40;</span><span class="re0">$format</span><span class="sy0">,</span><span class="re0">$num</span><span class="sy0">,</span><span class="re0">$f</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co2"># code...</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="sy1">?&gt;</span></div></td></tr></tbody></table></div>
<p>&#160;</p>
<p>Now on to the method to convert each of the rows into an array.</p>
<p><strong>The dumptoarray method</strong></p>
<div class="codecolorer-container php " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br /></div></td><td><div class="php codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw2">&lt;?php</span><br />
&nbsp; &nbsp; <span class="kw2">function</span> dumptoarray<span class="br0">&#40;</span><span class="re0">$sheet</span><span class="sy0">=</span><span class="nu0">0</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$array</span> <span class="sy0">=</span> <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Step through each row.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span><span class="br0">&#40;</span><span class="re0">$row</span><span class="sy0">=</span><span class="nu0">1</span><span class="sy0">;</span><span class="re0">$row</span><span class="sy0">&lt;=</span><span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">rowcount</span><span class="br0">&#40;</span><span class="re0">$sheet</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="re0">$row</span><span class="sy0">++</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Step through each column</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span><span class="br0">&#40;</span><span class="re0">$col</span><span class="sy0">=</span><span class="nu0">1</span><span class="sy0">;</span><span class="re0">$col</span><span class="sy0">&lt;=</span><span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">colcount</span><span class="br0">&#40;</span><span class="re0">$sheet</span><span class="br0">&#41;</span><span class="sy0">;</span><span class="re0">$col</span><span class="sy0">++</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Add each cell value into the array.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$array</span><span class="br0">&#91;</span><span class="re0">$row</span><span class="br0">&#93;</span><span class="br0">&#91;</span><span class="re0">$col</span><span class="br0">&#93;</span> <span class="sy0">=</span> <a href="http://www.php.net/htmlentities"><span class="kw3">htmlentities</span></a><span class="br0">&#40;</span><span class="re0">$this</span><span class="sy0">-&gt;</span><span class="me1">val</span><span class="br0">&#40;</span><span class="re0">$row</span><span class="sy0">,</span><span class="re0">$col</span><span class="sy0">,</span><span class="re0">$sheet</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="re0">$array</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="sy1">?&gt;</span></div></td></tr></tbody></table></div>
<p>&#160;</p>
<p>If you don&#8217;t have a phone number formatting in your excel document feel free to skip this.  All we&#8217;ll be doing is copying the method from the original class, and place in some new code that handles formatting for phone numbers.</p>
<p>Here is the extra code we&#8217;ll be placing in the code from the original class.</p>
<div class="codecolorer-container php " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br /></div></td><td><div class="php codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw2">&lt;?php</span><br />
&nbsp; <span class="co1">//Handle Phone Numbers</span><br />
&nbsp; <br />
&nbsp; <span class="co1">//Check to see if formatting fits (###) ###-####</span><br />
&nbsp; <span class="re0">$phone_regex</span> <span class="sy0">=</span> <span class="st0">&quot;/\((\d{3})\) (\d{3})-(\d{4})/&quot;</span><span class="sy0">;</span><br />
&nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><a href="http://www.php.net/preg_match"><span class="kw3">preg_match</span></a><span class="br0">&#40;</span><span class="re0">$phone_regex</span><span class="sy0">,</span><span class="re0">$pattern</span><span class="sy0">,</span><span class="re0">$matches</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
<br />
&nbsp; &nbsp; <span class="co1">//Puts the number in the cell into the formatting we require.</span><br />
&nbsp; &nbsp; <span class="re0">$formatted</span> <span class="sy0">=</span> <span class="st0">&quot;(&quot;</span><span class="sy0">.</span><a href="http://www.php.net/substr"><span class="kw3">substr</span></a><span class="br0">&#40;</span><span class="re0">$num</span><span class="sy0">,</span><span class="nu0">0</span><span class="sy0">,</span><span class="nu0">3</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="st0">&quot;) &quot;</span><span class="sy0">.</span><a href="http://www.php.net/substr"><span class="kw3">substr</span></a><span class="br0">&#40;</span><span class="re0">$num</span><span class="sy0">,</span><span class="nu0">3</span><span class="sy0">,</span><span class="nu0">3</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="st0">&quot;-&quot;</span><span class="sy0">.</span><a href="http://www.php.net/substr"><span class="kw3">substr</span></a><span class="br0">&#40;</span><span class="re0">$num</span><span class="sy0">,</span><span class="nu0">6</span><span class="sy0">,</span><span class="nu0">4</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="co1">//sets pattern for use in class.</span><br />
&nbsp; &nbsp; <span class="re0">$pattern</span> <span class="sy0">=</span> <a href="http://www.php.net/preg_replace"><span class="kw3">preg_replace</span></a><span class="br0">&#40;</span><span class="re0">$phone_regex</span><span class="sy0">,</span> <span class="re0">$formatted</span><span class="sy0">,</span> <span class="re0">$pattern</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; <span class="br0">&#125;</span><br />
&nbsp; <br />
&nbsp; <span class="co1">//set values and exits method.</span><br />
&nbsp; <span class="kw1">return</span> <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><br />
&nbsp; &nbsp; <span class="st_h">'string'</span><span class="sy0">=&gt;</span><span class="re0">$pattern</span><span class="sy0">,</span><br />
&nbsp; &nbsp; <span class="st_h">'formatColor'</span><span class="sy0">=&gt;</span><span class="re0">$color</span><br />
&nbsp; <span class="br0">&#41;</span><span class="sy0">;</span><br />
<span class="sy1">?&gt;</span></div></td></tr></tbody></table></div>
<p>&#160;</p>
<p>So now our method looks something like&#8230;</p>
<p><strong>_format_value method</strong></p>
<div class="codecolorer-container php " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br />92<br />93<br /></div></td><td><div class="php codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw2">&lt;?php</span><br />
&nbsp; <span class="kw2">function</span> _format_value<span class="br0">&#40;</span><span class="re0">$format</span><span class="sy0">,</span><span class="re0">$num</span><span class="sy0">,</span><span class="re0">$f</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; <span class="co1">// 49==TEXT format</span><br />
&nbsp; &nbsp; &nbsp; <span class="co1">// http://code.google.com/p/php-excel-reader/issues/detail?id=7</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span> <span class="br0">&#40;</span><span class="sy0">!</span><span class="re0">$f</span> <span class="sy0">&amp;&amp;</span> <span class="re0">$format</span><span class="sy0">==</span><span class="st0">&quot;<span class="es6">%s</span>&quot;</span><span class="br0">&#41;</span> <span class="sy0">||</span> <span class="br0">&#40;</span><span class="re0">$f</span><span class="sy0">==</span><span class="nu0">49</span><span class="br0">&#41;</span> <span class="sy0">||</span> <span class="br0">&#40;</span><span class="re0">$format</span><span class="sy0">==</span><span class="st0">&quot;GENERAL&quot;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span> <span class="br0">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="st_h">'string'</span><span class="sy0">=&gt;</span><span class="re0">$num</span><span class="sy0">,</span> <span class="st_h">'formatColor'</span><span class="sy0">=&gt;</span>null<span class="br0">&#41;</span><span class="sy0">;</span> <br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span class="co1">// Custom pattern can be POSITIVE;NEGATIVE;ZERO</span><br />
&nbsp; &nbsp; &nbsp; <span class="co1">// The &quot;text&quot; option as 4th parameter is not handled</span><br />
&nbsp; &nbsp; &nbsp; <span class="re0">$parts</span> <span class="sy0">=</span> <a href="http://www.php.net/split"><span class="kw3">split</span></a><span class="br0">&#40;</span><span class="st0">&quot;;&quot;</span><span class="sy0">,</span><span class="re0">$format</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="re0">$pattern</span> <span class="sy0">=</span> <span class="re0">$parts</span><span class="br0">&#91;</span><span class="nu0">0</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="co1">// Negative pattern</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><a href="http://www.php.net/count"><span class="kw3">count</span></a><span class="br0">&#40;</span><span class="re0">$parts</span><span class="br0">&#41;</span><span class="sy0">&gt;</span><span class="nu0">2</span> <span class="sy0">&amp;&amp;</span> <span class="re0">$num</span><span class="sy0">==</span><span class="nu0">0</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$pattern</span> <span class="sy0">=</span> <span class="re0">$parts</span><span class="br0">&#91;</span><span class="nu0">2</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; <span class="co1">// Zero pattern</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><a href="http://www.php.net/count"><span class="kw3">count</span></a><span class="br0">&#40;</span><span class="re0">$parts</span><span class="br0">&#41;</span><span class="sy0">&gt;</span><span class="nu0">1</span> <span class="sy0">&amp;&amp;</span> <span class="re0">$num</span><span class="sy0">&lt;</span><span class="nu0">0</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$pattern</span> <span class="sy0">=</span> <span class="re0">$parts</span><span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$num</span> <span class="sy0">=</span> <a href="http://www.php.net/abs"><span class="kw3">abs</span></a><span class="br0">&#40;</span><span class="re0">$num</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span class="re0">$color</span> <span class="sy0">=</span> <span class="st0">&quot;&quot;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="re0">$matches</span> <span class="sy0">=</span> <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="re0">$color_regex</span> <span class="sy0">=</span> <span class="st0">&quot;/^\[(BLACK|BLUE|CYAN|GREEN|MAGENTA|RED|WHITE|YELLOW)\]/i&quot;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><a href="http://www.php.net/preg_match"><span class="kw3">preg_match</span></a><span class="br0">&#40;</span><span class="re0">$color_regex</span><span class="sy0">,</span><span class="re0">$pattern</span><span class="sy0">,</span><span class="re0">$matches</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$color</span> <span class="sy0">=</span> <a href="http://www.php.net/strtolower"><span class="kw3">strtolower</span></a><span class="br0">&#40;</span><span class="re0">$matches</span><span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$pattern</span> <span class="sy0">=</span> <a href="http://www.php.net/preg_replace"><span class="kw3">preg_replace</span></a><span class="br0">&#40;</span><span class="re0">$color_regex</span><span class="sy0">,</span><span class="st0">&quot;&quot;</span><span class="sy0">,</span><span class="re0">$pattern</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span class="co1">// In Excel formats, &quot;_&quot; is used to add spacing, which we can't do in HTML</span><br />
&nbsp; &nbsp; &nbsp; <span class="re0">$pattern</span> <span class="sy0">=</span> <a href="http://www.php.net/preg_replace"><span class="kw3">preg_replace</span></a><span class="br0">&#40;</span><span class="st0">&quot;/_./&quot;</span><span class="sy0">,</span><span class="st0">&quot;&quot;</span><span class="sy0">,</span><span class="re0">$pattern</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span class="co1">// Some non-number characters are escaped with \, which we don't need</span><br />
&nbsp; &nbsp; &nbsp; <span class="re0">$pattern</span> <span class="sy0">=</span> <a href="http://www.php.net/preg_replace"><span class="kw3">preg_replace</span></a><span class="br0">&#40;</span><span class="st0">&quot;/\\\/&quot;</span><span class="sy0">,</span><span class="st0">&quot;&quot;</span><span class="sy0">,</span><span class="re0">$pattern</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span class="co1">// Some non-number strings are quoted, so we'll get rid of the quotes</span><br />
&nbsp; &nbsp; &nbsp; <span class="re0">$pattern</span> <span class="sy0">=</span> <a href="http://www.php.net/preg_replace"><span class="kw3">preg_replace</span></a><span class="br0">&#40;</span><span class="st0">&quot;/<span class="es1">\&quot;</span>/&quot;</span><span class="sy0">,</span><span class="st0">&quot;&quot;</span><span class="sy0">,</span><span class="re0">$pattern</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span class="co1">// TEMPORARY - Convert # to 0</span><br />
&nbsp; &nbsp; &nbsp; <span class="re0">$pattern</span> <span class="sy0">=</span> <a href="http://www.php.net/preg_replace"><span class="kw3">preg_replace</span></a><span class="br0">&#40;</span><span class="st0">&quot;/\#/&quot;</span><span class="sy0">,</span><span class="st0">&quot;0&quot;</span><span class="sy0">,</span><span class="re0">$pattern</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span class="co1">// Find out if we need comma formatting</span><br />
&nbsp; &nbsp; &nbsp; <span class="re0">$has_commas</span> <span class="sy0">=</span> <a href="http://www.php.net/preg_match"><span class="kw3">preg_match</span></a><span class="br0">&#40;</span><span class="st0">&quot;/,/&quot;</span><span class="sy0">,</span><span class="re0">$pattern</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$has_commas</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$pattern</span> <span class="sy0">=</span> <a href="http://www.php.net/preg_replace"><span class="kw3">preg_replace</span></a><span class="br0">&#40;</span><span class="st0">&quot;/,/&quot;</span><span class="sy0">,</span><span class="st0">&quot;&quot;</span><span class="sy0">,</span><span class="re0">$pattern</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span class="co1">// Handle Percentages</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><a href="http://www.php.net/preg_match"><span class="kw3">preg_match</span></a><span class="br0">&#40;</span><span class="st0">&quot;/\d(\%)([^\%]|$)/&quot;</span><span class="sy0">,</span><span class="re0">$pattern</span><span class="sy0">,</span><span class="re0">$matches</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$num</span> <span class="sy0">=</span> <span class="re0">$num</span> <span class="sy0">*</span> <span class="nu0">100</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$pattern</span> <span class="sy0">=</span> <a href="http://www.php.net/preg_replace"><span class="kw3">preg_replace</span></a><span class="br0">&#40;</span><span class="st0">&quot;/(\d)(\%)([^\%]|$)/&quot;</span><span class="sy0">,</span><span class="st0">&quot;<span class="es4">$1</span>%<span class="es4">$3</span>&quot;</span><span class="sy0">,</span><span class="re0">$pattern</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
<br />
&nbsp; &nbsp; &nbsp; <span class="co1">//Handle Phone Numbers</span><br />
&nbsp; &nbsp; &nbsp; <span class="re0">$phone_regex</span> <span class="sy0">=</span> <span class="st0">&quot;/\((\d{3})\) (\d{3})-(\d{4})/&quot;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><a href="http://www.php.net/preg_match"><span class="kw3">preg_match</span></a><span class="br0">&#40;</span><span class="re0">$phone_regex</span><span class="sy0">,</span><span class="re0">$pattern</span><span class="sy0">,</span><span class="re0">$matches</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$formatted</span> <span class="sy0">=</span> <span class="st0">&quot;(&quot;</span><span class="sy0">.</span><a href="http://www.php.net/substr"><span class="kw3">substr</span></a><span class="br0">&#40;</span><span class="re0">$num</span><span class="sy0">,</span><span class="nu0">0</span><span class="sy0">,</span><span class="nu0">3</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="st0">&quot;) &quot;</span><span class="sy0">.</span><a href="http://www.php.net/substr"><span class="kw3">substr</span></a><span class="br0">&#40;</span><span class="re0">$num</span><span class="sy0">,</span><span class="nu0">3</span><span class="sy0">,</span><span class="nu0">3</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="st0">&quot;-&quot;</span><span class="sy0">.</span><a href="http://www.php.net/substr"><span class="kw3">substr</span></a><span class="br0">&#40;</span><span class="re0">$num</span><span class="sy0">,</span><span class="nu0">6</span><span class="sy0">,</span><span class="nu0">4</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$pattern</span> <span class="sy0">=</span> <a href="http://www.php.net/preg_replace"><span class="kw3">preg_replace</span></a><span class="br0">&#40;</span><span class="re0">$phone_regex</span><span class="sy0">,</span> <span class="re0">$formatted</span><span class="sy0">,</span> <span class="re0">$pattern</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="st_h">'string'</span><span class="sy0">=&gt;</span><span class="re0">$pattern</span><span class="sy0">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="st_h">'formatColor'</span><span class="sy0">=&gt;</span><span class="re0">$color</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span class="co1">// Handle the number itself</span><br />
&nbsp; &nbsp; &nbsp; <span class="re0">$number_regex</span> <span class="sy0">=</span> <span class="st0">&quot;/(\d+)(\.?)(\d*)/&quot;</span><span class="sy0">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><a href="http://www.php.net/preg_match"><span class="kw3">preg_match</span></a><span class="br0">&#40;</span><span class="re0">$number_regex</span><span class="sy0">,</span><span class="re0">$pattern</span><span class="sy0">,</span><span class="re0">$matches</span><span class="br0">&#41;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$left</span> <span class="sy0">=</span> <span class="re0">$matches</span><span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$dec</span> <span class="sy0">=</span> <span class="re0">$matches</span><span class="br0">&#91;</span><span class="nu0">2</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$right</span> <span class="sy0">=</span> <span class="re0">$matches</span><span class="br0">&#91;</span><span class="nu0">3</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="re0">$has_commas</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$formatted</span> <span class="sy0">=</span> <a href="http://www.php.net/number_format"><span class="kw3">number_format</span></a><span class="br0">&#40;</span><span class="re0">$num</span><span class="sy0">,</span><a href="http://www.php.net/strlen"><span class="kw3">strlen</span></a><span class="br0">&#40;</span><span class="re0">$right</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">else</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$sprintf_pattern</span> <span class="sy0">=</span> <span class="st0">&quot;%1.&quot;</span><span class="sy0">.</span><a href="http://www.php.net/strlen"><span class="kw3">strlen</span></a><span class="br0">&#40;</span><span class="re0">$right</span><span class="br0">&#41;</span><span class="sy0">.</span><span class="st0">&quot;f&quot;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$formatted</span> <span class="sy0">=</span> <a href="http://www.php.net/sprintf"><span class="kw3">sprintf</span></a><span class="br0">&#40;</span><span class="re0">$sprintf_pattern</span><span class="sy0">,</span> <span class="re0">$num</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">$pattern</span> <span class="sy0">=</span> <a href="http://www.php.net/preg_replace"><span class="kw3">preg_replace</span></a><span class="br0">&#40;</span><span class="re0">$number_regex</span><span class="sy0">,</span> <span class="re0">$formatted</span><span class="sy0">,</span> <span class="re0">$pattern</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <a href="http://www.php.net/array"><span class="kw3">array</span></a><span class="br0">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="st_h">'string'</span><span class="sy0">=&gt;</span><span class="re0">$pattern</span><span class="sy0">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="st_h">'formatColor'</span><span class="sy0">=&gt;</span><span class="re0">$color</span><br />
&nbsp; &nbsp; &nbsp; <span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; <span class="br0">&#125;</span><br />
<span class="sy1">?&gt;</span></div></td></tr></tbody></table></div>
<h2>JSON Our Entries</h2>
<p>Now it&#8217;s as simple as pulling in our excel file, calling our dumptoarray method and convert it to JSON.  The JSON will be read by jQuery and parsed accordingly.</p>
<p>To do all of this, we&#8217;ll create the file list.php and place everything in there.</p>
<p><strong>list.php</strong></p>
<div class="codecolorer-container php " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br /></div></td><td><div class="php codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw2">&lt;?php</span><br />
&nbsp; &nbsp; <span class="co1">//load in our class we created.</span><br />
&nbsp; &nbsp; <span class="kw1">require_once</span> <span class="st_h">'ExcelReader.php'</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="co1">//Reads our excel document.</span><br />
&nbsp; &nbsp; <span class="re0">$data</span> <span class="sy0">=</span> <span class="kw2">new</span> ExcelReader<span class="br0">&#40;</span><span class="st0">&quot;entries.xls&quot;</span><span class="sy0">,</span><span class="kw2">false</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="co1">//Put our rows into an array.</span><br />
&nbsp; &nbsp; <span class="re0">$ary</span> <span class="sy0">=</span> <span class="re0">$data</span><span class="sy0">-&gt;</span><span class="me1">dumptoarray</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="co1">//Convert the array in json.</span><br />
&nbsp; &nbsp; <span class="re0">$json</span> <span class="sy0">=</span> json_encode<span class="br0">&#40;</span><span class="re0">$ary</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="co1">//display the json.</span><br />
&nbsp; &nbsp; <a href="http://www.php.net/print"><span class="kw3">print</span></a> <span class="re0">$json</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="sy1">?&gt;</span></div></td></tr></tbody></table></div>
<h2>Load in Our JSON via Ajax</h2>
<p>Our HTML is going to be pretty simple.  We&#8217;re just going to have one div with an id=&#8221;content&#8221; and a title.</p>
<p><strong>Here is the HTML</strong></p>
<div class="codecolorer-container html4strict " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br /></div></td><td><div class="html4strict codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="sc0">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/html.html"><span class="kw2">html</span></a> xmlns<span class="sy0">=</span><span class="st0">&quot;http://www.w3.org/1999/xhtml&quot;</span> xml:<span class="kw3">lang</span><span class="sy0">=</span><span class="st0">&quot;ru&quot;</span>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/head.html"><span class="kw2">head</span></a>&gt;</span><br />
&nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/title.html"><span class="kw2">title</span></a>&gt;</span>Excel Reader<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/title.html"><span class="kw2">title</span></a>&gt;</span><br />
&nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/meta.html"><span class="kw2">meta</span></a> <span class="kw3">http-equiv</span><span class="sy0">=</span><span class="st0">&quot;Content-Type&quot;</span> <span class="kw3">content</span><span class="sy0">=</span><span class="st0">&quot;text/html;charset=UTF-8&quot;</span><span class="sy0">/</span>&gt;</span><br />
&nbsp; &nbsp; <br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/head.html"><span class="kw2">head</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/body.html"><span class="kw2">body</span></a>&gt;</span><br />
&nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;content&quot;</span>&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/h1.html"><span class="kw2">h1</span></a> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;excelEntries&quot;</span>&gt;</span>Hair Salons in Canada<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/h1.html"><span class="kw2">h1</span></a>&gt;</span><br />
&nbsp; &nbsp; <span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a>&gt;</span>&nbsp; <br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/body.html"><span class="kw2">body</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/html.html"><span class="kw2">html</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>Our jQuery isn&#8217;t overly complicated. We load in the JSON via Ajax, and we just step through each entry and format it accordingly.</p>
<p><strong>The jQuery</strong></p>
<div class="codecolorer-container javascript " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br /></div></td><td><div class="javascript codecolorer" style="font-family:Monaco,Lucida Console,monospace">$.<span class="me1">getJSON</span><span class="br0">&#40;</span><span class="st0">&quot;list.php&quot;</span><span class="sy0">,</span><br />
&nbsp; &nbsp; &nbsp; <span class="kw2">function</span><span class="br0">&#40;</span>data<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> <span class="kw1">item</span> <span class="sy0">=</span> data<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> content <span class="sy0">=</span> <span class="st0">&quot;&quot;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Loop through each entry.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw2">var</span> i <span class="kw1">in</span> data<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// data[row][column] references cell from excel document.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> <span class="kw3">name</span> <span class="sy0">=</span> data<span class="br0">&#91;</span>i<span class="br0">&#93;</span><span class="br0">&#91;</span><span class="nu0">1</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> address <span class="sy0">=</span> data<span class="br0">&#91;</span>i<span class="br0">&#93;</span><span class="br0">&#91;</span><span class="nu0">2</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> city <span class="sy0">=</span> data<span class="br0">&#91;</span>i<span class="br0">&#93;</span><span class="br0">&#91;</span><span class="nu0">3</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> province <span class="sy0">=</span> data<span class="br0">&#91;</span>i<span class="br0">&#93;</span><span class="br0">&#91;</span><span class="nu0">4</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> postal <span class="sy0">=</span> data<span class="br0">&#91;</span>i<span class="br0">&#93;</span><span class="br0">&#91;</span><span class="nu0">5</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw2">var</span> phone <span class="sy0">=</span> data<span class="br0">&#91;</span>i<span class="br0">&#93;</span><span class="br0">&#91;</span><span class="nu0">6</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//First row is column headers.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>i <span class="sy0">&gt;</span> <span class="nu0">1</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Format Entry</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; content <span class="sy0">+=</span> <span class="st0">&quot;&lt;div class='entry'&gt;&quot;</span><span class="sy0">+</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;&lt;h4&gt; &quot;</span><span class="sy0">+</span><span class="kw3">name</span><span class="sy0">+</span> <span class="st0">&quot;&lt;/h4&gt;&quot;</span><span class="sy0">+</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;&lt;strong&gt;Address:&lt;/strong&gt; &quot;</span><span class="sy0">+</span>address<span class="sy0">+</span><span class="st0">&quot;&lt;br /&gt;&quot;</span><span class="sy0">+</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;&lt;strong&gt;City:&lt;/strong&gt; &quot;</span><span class="sy0">+</span>city<span class="sy0">+</span><span class="st0">&quot;&lt;br /&gt;&quot;</span><span class="sy0">+</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;&lt;strong&gt;Province:&lt;/strong&gt; &quot;</span><span class="sy0">+</span>province<span class="sy0">+</span><span class="st0">&quot;&lt;br /&gt;&quot;</span><span class="sy0">+</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;&lt;strong&gt;Postal Code:&lt;/strong&gt; &quot;</span><span class="sy0">+</span>postal<span class="sy0">+</span><span class="st0">&quot;&lt;br /&gt;&quot;</span><span class="sy0">+</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;&lt;strong&gt;Phone Number:&lt;/strong&gt; &quot;</span><span class="sy0">+</span>phone<span class="sy0">+</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;&lt;/div&gt;&quot;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//Add entry to page.</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $<span class="br0">&#40;</span><span class="st0">'#content'</span><span class="br0">&#41;</span>.<span class="me1">append</span><span class="br0">&#40;</span>content<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><span class="br0">&#41;</span><span class="sy0">;</span></div></td></tr></tbody></table></div>
<p>After adding some css, your HTML page should look something like&#8230;</p>
<div class="codecolorer-container html4strict " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br />55<br />56<br />57<br />58<br />59<br />60<br />61<br />62<br />63<br />64<br />65<br />66<br />67<br />68<br />69<br />70<br />71<br />72<br />73<br />74<br />75<br />76<br />77<br />78<br />79<br />80<br />81<br />82<br />83<br />84<br />85<br />86<br />87<br />88<br />89<br />90<br />91<br />92<br />93<br /></div></td><td><div class="html4strict codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="sc0">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/html.html"><span class="kw2">html</span></a> xmlns<span class="sy0">=</span><span class="st0">&quot;http://www.w3.org/1999/xhtml&quot;</span> xml:<span class="kw3">lang</span><span class="sy0">=</span><span class="st0">&quot;ru&quot;</span>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/head.html"><span class="kw2">head</span></a>&gt;</span><br />
&nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/title.html"><span class="kw2">title</span></a>&gt;</span>Excel Reader<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/title.html"><span class="kw2">title</span></a>&gt;</span><br />
&nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/meta.html"><span class="kw2">meta</span></a> <span class="kw3">http-equiv</span><span class="sy0">=</span><span class="st0">&quot;Content-Type&quot;</span> <span class="kw3">content</span><span class="sy0">=</span><span class="st0">&quot;text/html;charset=UTF-8&quot;</span><span class="sy0">/</span>&gt;</span><br />
&nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/style.html"><span class="kw2">style</span></a> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/css&quot;</span> <span class="kw3">media</span><span class="sy0">=</span><span class="st0">&quot;screen&quot;</span>&gt;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; body{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; font-family: Arial, &quot;MS Trebuchet&quot;, sans-serif;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; font-size:.8em;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; color:#333;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; /* Styling Entries */<br />
&nbsp; &nbsp; &nbsp; &nbsp; .entry{<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background:#efefef;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; padding:10px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border:1px solid #ddd;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; line-height:1.5em;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; margin:0 5px 5px 0px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; width:400px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; float:left;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* Rounded Corners */<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -moz-border-radius:10px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -webkit-border-radius:10px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -khtml-border-radius:10px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; border-radius:10px;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /*Inner shadow */<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -moz-box-shadow: 2px 2px 3px #ddd; /* FF3.5 */<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -webkit-box-shadow: 2px 2px 3px #ddd; /* Saf3.0 , Chrome */<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; box-shadow: 2px 2px 3px #ddd; /* Opera 10.5, IE 9.0 */<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* Gradient */<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#efefef', endColorstr='#dedede'); /* for IE */<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background: -webkit-gradient(linear, left top, left bottom, from(#efefef), to(#dedede)); /* for webkit browsers */<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background: -moz-linear-gradient(top, &nbsp;#efefef, &nbsp;#dedede); /* for firefox 3.6+ */<br />
<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; h4{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; margin:3px 0px;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; font-size:1.5em;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; color:#014A8D;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; text-shadow:0 1px 1px #fff;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; <span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/style.html"><span class="kw2">style</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/head.html"><span class="kw2">head</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/body.html"><span class="kw2">body</span></a>&gt;</span><br />
<br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;content&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/h1.html"><span class="kw2">h1</span></a> <span class="kw3">id</span><span class="sy0">=</span><span class="st0">&quot;excelEntries&quot;</span>&gt;</span>Hair Salons in Canada<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/h1.html"><span class="kw2">h1</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a> <span class="kw3">src</span><span class="sy0">=</span><span class="st0">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;</span> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span> <span class="kw3">charset</span><span class="sy0">=</span><span class="st0">&quot;utf-8&quot;</span>&gt;&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a>&gt;</span><br />
<span class="sc2">&lt;<a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a> <span class="kw3">type</span><span class="sy0">=</span><span class="st0">&quot;text/javascript&quot;</span> <span class="kw3">charset</span><span class="sy0">=</span><span class="st0">&quot;utf-8&quot;</span>&gt;</span><br />
&nbsp; &nbsp; $.getJSON(&quot;list.php&quot;,<br />
&nbsp; &nbsp; &nbsp; function(data){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var item = data;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var content = &quot;&quot;;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for (var i in data) {<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // data[row][column] references cell from excel document.<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var name = data[i][1];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var address = data[i][2];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var city = data[i][3];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var province = data[i][4];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var postal = data[i][5];<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var phone = data[i][6];<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (i &gt; 1){<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; content += &quot;<span class="sc2">&lt;<a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a> <span class="kw3">class</span><span class="sy0">=</span><span class="st0">'entry'</span>&gt;</span>&quot;+<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;<span class="sc2">&lt;<a href="http://december.com/html/4/element/h4.html"><span class="kw2">h4</span></a>&gt;</span> &quot;+name+ &quot;<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/h4.html"><span class="kw2">h4</span></a>&gt;</span>&quot;+<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;<span class="sc2">&lt;<a href="http://december.com/html/4/element/strong.html"><span class="kw2">strong</span></a>&gt;</span>Address:<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/strong.html"><span class="kw2">strong</span></a>&gt;</span> &quot;+address+&quot;<span class="sc2">&lt;<a href="http://december.com/html/4/element/br.html"><span class="kw2">br</span></a> <span class="sy0">/</span>&gt;</span>&quot;+<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;<span class="sc2">&lt;<a href="http://december.com/html/4/element/strong.html"><span class="kw2">strong</span></a>&gt;</span>City:<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/strong.html"><span class="kw2">strong</span></a>&gt;</span> &quot;+city+&quot;<span class="sc2">&lt;<a href="http://december.com/html/4/element/br.html"><span class="kw2">br</span></a> <span class="sy0">/</span>&gt;</span>&quot;+<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;<span class="sc2">&lt;<a href="http://december.com/html/4/element/strong.html"><span class="kw2">strong</span></a>&gt;</span>Province:<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/strong.html"><span class="kw2">strong</span></a>&gt;</span> &quot;+province+&quot;<span class="sc2">&lt;<a href="http://december.com/html/4/element/br.html"><span class="kw2">br</span></a> <span class="sy0">/</span>&gt;</span>&quot;+<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;<span class="sc2">&lt;<a href="http://december.com/html/4/element/strong.html"><span class="kw2">strong</span></a>&gt;</span>Postal Code:<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/strong.html"><span class="kw2">strong</span></a>&gt;</span> &quot;+postal+&quot;<span class="sc2">&lt;<a href="http://december.com/html/4/element/br.html"><span class="kw2">br</span></a> <span class="sy0">/</span>&gt;</span>&quot;+<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;<span class="sc2">&lt;<a href="http://december.com/html/4/element/strong.html"><span class="kw2">strong</span></a>&gt;</span>Phone Number:<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/strong.html"><span class="kw2">strong</span></a>&gt;</span> &quot;+phone+<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a>&gt;</span>&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $('#content').append(content);<br />
&nbsp; &nbsp; &nbsp; &nbsp;});<br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/script.html"><span class="kw2">script</span></a>&gt;</span><br />
<br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/body.html"><span class="kw2">body</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/html.html"><span class="kw2">html</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>That should be it.  Be sure to download all the files and fiddle around with it yourself. Also be sure to read up on the <a href="http://code.google.com/p/php-excel-reader/wiki/Documentation" target="_blank">documentation that comes with the excel reader class</a>.</p>
<div class="resources">
	 <a href="http://www.devirtuoso.com/Examples/Excel-Ajax/excel.zip"class="Download" target="_blank">Download</a>  <a href="http://www.devirtuoso.com/Examples/Excel-Ajax/"class="Example" target="_blank">Example</a>
</div>
<p>&#160;</p>
<p>&#160;</p>

<p><a href="http://feedads.g.doubleclick.net/~a/lc90A8KRlYfcnfE3QvwgDxXTy-I/0/da"><img src="http://feedads.g.doubleclick.net/~a/lc90A8KRlYfcnfE3QvwgDxXTy-I/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/lc90A8KRlYfcnfE3QvwgDxXTy-I/1/da"><img src="http://feedads.g.doubleclick.net/~a/lc90A8KRlYfcnfE3QvwgDxXTy-I/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=6Pi2l4rYqUA:rnoAyldkxWU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=6Pi2l4rYqUA:rnoAyldkxWU:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=6Pi2l4rYqUA:rnoAyldkxWU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=6Pi2l4rYqUA:rnoAyldkxWU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=6Pi2l4rYqUA:rnoAyldkxWU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=6Pi2l4rYqUA:rnoAyldkxWU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=6Pi2l4rYqUA:rnoAyldkxWU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=6Pi2l4rYqUA:rnoAyldkxWU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=6Pi2l4rYqUA:rnoAyldkxWU:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devirtuoso.com/2010/08/reading-excel-documents-with-php-and-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.devirtuoso.com/2010/08/reading-excel-documents-with-php-and-ajax/</feedburner:origLink></item>
		<item>
		<title>Development Tool: Zen Coding</title>
		<link>http://feedproxy.google.com/~r/Devirtuoso/~3/qu5ErTWZfqI/</link>
		<comments>http://www.devirtuoso.com/2010/08/development-tool-zen-coding/#comments</comments>
		<pubDate>Fri, 13 Aug 2010 13:25:11 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Front End Development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[development Tools]]></category>

		<guid isPermaLink="false">http://www.devirtuoso.com/?p=1194</guid>
		<description><![CDATA[Zen Coding is by far my favorite development tool.  It makes website development quick and easy, and like the name suggests it instills a state of calm So What is Zen Coding? Zen Coding is a variety of snippets to make your life easier.  Their demo video explains it all too well. Zen Coding v0.5 [...]]]></description>
			<content:encoded><![CDATA[<p><a title="Zen Coding" href="http://http://code.google.com/p/zen-coding/" target="_blank">Zen Coding</a> is by far my favorite development tool.  It makes website development quick and easy, and like the name suggests it instills a state of calm <img src='http://www.devirtuoso.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
<span id="more-1194"></span></p>
<h3>So What is Zen Coding?</h3>
<p>Zen Coding is a variety of snippets to make your life easier.  Their demo video explains it all too well.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="400" height="275" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=7405114&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" /><embed type="application/x-shockwave-flash" width="400" height="275" src="http://vimeo.com/moogaloop.swf?clip_id=7405114&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=&amp;fullscreen=1&amp;autoplay=0&amp;loop=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://vimeo.com/7405114">Zen Coding v0.5</a> from <a href="http://vimeo.com/user2060676">Sergey Chikuyonok</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>The best part about all of this is how many IDEs it&#8217;s available for.  There is 21 versions of it in the downloads.  <a title="Zen Coding Download List" href="http://code.google.com/p/zen-coding/downloads/list" target="_blank">Check them out</a>, there is probably one for your favorite IDE.</p>
<p>Be sure to get your copy at <a title="Zen Coding" href="http://code.google.com/p/zen-coding/" target="_blank">Zen Coding&#8217;s website</a>.  I guarantee you&#8217;ll love it.  Haven&#8217;t met a developer who hasn&#8217;t.</p>
<p>Enjoy!</p>

<p><a href="http://feedads.g.doubleclick.net/~a/JwVDJYtUc3qBVQYEVsRPXK3eSk0/0/da"><img src="http://feedads.g.doubleclick.net/~a/JwVDJYtUc3qBVQYEVsRPXK3eSk0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/JwVDJYtUc3qBVQYEVsRPXK3eSk0/1/da"><img src="http://feedads.g.doubleclick.net/~a/JwVDJYtUc3qBVQYEVsRPXK3eSk0/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=qu5ErTWZfqI:dJaKDt80Yo0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=qu5ErTWZfqI:dJaKDt80Yo0:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=qu5ErTWZfqI:dJaKDt80Yo0:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=qu5ErTWZfqI:dJaKDt80Yo0:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=qu5ErTWZfqI:dJaKDt80Yo0:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=qu5ErTWZfqI:dJaKDt80Yo0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=qu5ErTWZfqI:dJaKDt80Yo0:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=qu5ErTWZfqI:dJaKDt80Yo0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=qu5ErTWZfqI:dJaKDt80Yo0:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devirtuoso.com/2010/08/development-tool-zen-coding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.devirtuoso.com/2010/08/development-tool-zen-coding/</feedburner:origLink></item>
		<item>
		<title>Development Tool: CSS3 PIE for Internet Explorer</title>
		<link>http://feedproxy.google.com/~r/Devirtuoso/~3/jYMBL286_FM/</link>
		<comments>http://www.devirtuoso.com/2010/08/development-tool-css3-pie-for-internet-explorer/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 14:12:06 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Front End Development]]></category>
		<category><![CDATA[development Tools]]></category>
		<category><![CDATA[internet explorer]]></category>

		<guid isPermaLink="false">http://www.devirtuoso.com/?p=1184</guid>
		<description><![CDATA[Gone are the days of using images for rounded corners.  With CSS3 PIE internet explorer can now use CSS3 awesomeness. What is it? Quite simply CSS3 PIE is a file that you include in your CSS definitions to enable CSS3 styling (rounded corners, shadows, etc.) Internet Explorer is one of the last browsers that doesn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Gone are the days of using images for rounded corners.  With<a href="http://css3pie.com/" target="_blank"> CSS3 PIE</a> internet explorer can now use CSS3 awesomeness.</p>
<p><span id="more-1184"></span></p>
<h3>What is it?</h3>
<p>Quite simply <a href="http://css3pie.com/" target="_blank">CSS3 PIE</a> is a file that you include in your CSS definitions to enable CSS3 styling (rounded corners, shadows, etc.)  Internet Explorer is one of the last browsers that doesn&#8217;t support it natively, either by browser specific hack or proper CSS3.</p>
<h3>Creating Rounded Corners</h3>
<p>Here is a quick demo to show how simple it is to implement the htc file.</p>
<h4>HTML</h4>
<div class="codecolorer-container html4strict " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="sc2">&lt;<a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a> <span class="kw3">class</span><span class="sy0">=</span><span class="st0">&quot;sampleBox&quot;</span>&gt;&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/div.html"><span class="kw2">div</span></a>&gt;</span></div></td></tr></tbody></table></div>
<h4>CSS</h4>
<div class="codecolorer-container css " style="overflow:auto;white-space:nowrap;width:580px"><table cellspacing="0" cellpadding="0"><tbody><tr><td class="line-numbers"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br /></div></td><td><div class="css codecolorer" style="font-family:Monaco,Lucida Console,monospace">.sampleBox<span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="coMULTI">/* Initial Layout */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">display</span><span class="sy0">:</span><span class="kw2">block</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">background</span><span class="sy0">:</span><span class="re0">#014A8D</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">color</span><span class="sy0">:</span><span class="re0">#fff</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">width</span><span class="sy0">:</span><span class="re3">200px</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">height</span><span class="sy0">:</span><span class="re3">200px</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">border</span><span class="sy0">:</span><span class="re3">1px</span> <span class="kw2">solid</span> <span class="re0">#000</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="coMULTI">/*Rounded Corners for Firefox*/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; -moz-border-radius<span class="sy0">:</span><span class="re3">10px</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="coMULTI">/*Rounded Corners for Safari / Chrome*/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; -webkit-border-radius<span class="sy0">:</span><span class="re3">10px</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="coMULTI">/*Standard CSS3*/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; border-radius<span class="sy0">:</span><span class="re3">10px</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="coMULTI">/*THE MAGIC...includes htc file for IE*/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; behavior<span class="sy0">:</span> <span class="kw2">url</span><span class="br0">&#40;</span><span class="co2">PIE.htc</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="re1">.sampleBox</span><span class="re2">:hover</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; -moz-box-shadow<span class="sy0">:</span> <span class="re3">5px</span> <span class="re3">5px</span> <span class="re3">5px</span> <span class="re0">#666</span><span class="sy0">;</span> <span class="coMULTI">/* FF3.5 */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; -webkit-box-shadow<span class="sy0">:</span> <span class="re3">5px</span> <span class="re3">5px</span> <span class="re3">5px</span> <span class="re0">#666</span><span class="sy0">;</span> <span class="coMULTI">/* Saf3.0 , Chrome */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; box-shadow<span class="sy0">:</span> <span class="re3">5px</span> <span class="re3">5px</span> <span class="re3">5px</span> <span class="re0">#666</span><span class="sy0">;</span> <span class="coMULTI">/* Opera 10.5, IE 9.0 */</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="coMULTI">/* Don't need to include PIE here because it's inherited.*/</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></div></td></tr></tbody></table></div>
<div class="resources">
	 <a href="http://www.devirtuoso.com/Examples/CSS3-PIE/CSS3_PIE.zip"class="Download" target="_blank">Download</a>  <a href="http://www.devirtuoso.com/Examples/CSS3-PIE/"class="Example" target="_blank">Example</a>
</div>
<p>There is a bit of a delay as the script is run, so it&#8217;s not completely seamless.  Beggers can&#8217;t be choosers though.  Also one thing I noticed while working with it, your element needs to be a block element.  So if you&#8217;re have problems just throw up a display:block to fix any problems.  Otherwise a great tool.</p>
<p>For more examples visit <a href="http://css3pie.com/demos/tabs/" target="_blank">CSS3 PIE&#8217;s demo page</a></p>
<p>Be sure to check out the <a href="http://css3pie.com/" title="CSS3 PIE: CSS3 decorations for IE" target="_blank">main site</a> as well.</p>
<p>&#160;</p>

<p><a href="http://feedads.g.doubleclick.net/~a/fBKkKhpRXof-Z8pBiJqw9GlsNAI/0/da"><img src="http://feedads.g.doubleclick.net/~a/fBKkKhpRXof-Z8pBiJqw9GlsNAI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/fBKkKhpRXof-Z8pBiJqw9GlsNAI/1/da"><img src="http://feedads.g.doubleclick.net/~a/fBKkKhpRXof-Z8pBiJqw9GlsNAI/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=jYMBL286_FM:-6KZtUgr_co:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=jYMBL286_FM:-6KZtUgr_co:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=jYMBL286_FM:-6KZtUgr_co:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=jYMBL286_FM:-6KZtUgr_co:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=jYMBL286_FM:-6KZtUgr_co:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=jYMBL286_FM:-6KZtUgr_co:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=jYMBL286_FM:-6KZtUgr_co:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=jYMBL286_FM:-6KZtUgr_co:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=jYMBL286_FM:-6KZtUgr_co:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devirtuoso.com/2010/08/development-tool-css3-pie-for-internet-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.devirtuoso.com/2010/08/development-tool-css3-pie-for-internet-explorer/</feedburner:origLink></item>
		<item>
		<title>Google Sphere</title>
		<link>http://feedproxy.google.com/~r/Devirtuoso/~3/DTzMUMuqYtQ/</link>
		<comments>http://www.devirtuoso.com/2009/09/google-sphere/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 01:29:51 +0000</pubDate>
		<dc:creator>Shawn</dc:creator>
				<category><![CDATA[Experimental]]></category>
		<category><![CDATA[Front End Development]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[showcase]]></category>

		<guid isPermaLink="false">http://www.devirtuoso.com/?p=1174</guid>
		<description><![CDATA[Once again Google is broken in this fantastic experiment.  From the maker of Google Gravity, this experiment takes Google and forms it into a sphere. Google Sphere I love Mr.doob’s work.  Big points for creativity. The best part about it is that the image search still works. Again this one requires Chrome to view it, [...]]]></description>
			<content:encoded><![CDATA[<p>Once again Google is broken in this fantastic experiment.  From the maker of <a title="Google Gravity" href="http://www.devirtuoso.com/2009/08/google-gravity/" target="_self">Google Gravity</a>, this experiment takes Google and forms it into a sphere.</p>
<p><span id="more-1174"></span></p>
<h3><a title="Google Sphere" href="http://mrdoob.com/projects/chromeexperiments/google_sphere/" target="_blank">Google Sphere</a></h3>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://www.youtube.com/v/ttQuzEEsHhg&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;feature=player_embedded&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/ttQuzEEsHhg&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;feature=player_embedded&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>I love Mr.doob’s work.  Big points for creativity. The best part about it is that the image search still works.</p>
<p>Again this one requires Chrome to view it, he uses the webkit to transform his Actionscript 3 3d engine into JavaScript.</p>

<p><a href="http://feedads.g.doubleclick.net/~a/_fvoBpT6Ly8SBKokRWHug8sb40k/0/da"><img src="http://feedads.g.doubleclick.net/~a/_fvoBpT6Ly8SBKokRWHug8sb40k/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/_fvoBpT6Ly8SBKokRWHug8sb40k/1/da"><img src="http://feedads.g.doubleclick.net/~a/_fvoBpT6Ly8SBKokRWHug8sb40k/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=DTzMUMuqYtQ:F2E5Qvb_yQs:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=DTzMUMuqYtQ:F2E5Qvb_yQs:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=DTzMUMuqYtQ:F2E5Qvb_yQs:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=DTzMUMuqYtQ:F2E5Qvb_yQs:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=DTzMUMuqYtQ:F2E5Qvb_yQs:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=DTzMUMuqYtQ:F2E5Qvb_yQs:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=DTzMUMuqYtQ:F2E5Qvb_yQs:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/Devirtuoso?a=DTzMUMuqYtQ:F2E5Qvb_yQs:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/Devirtuoso?i=DTzMUMuqYtQ:F2E5Qvb_yQs:F7zBnMyn0Lo" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.devirtuoso.com/2009/09/google-sphere/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.devirtuoso.com/2009/09/google-sphere/</feedburner:origLink></item>
	</channel>
</rss>
