<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>&#60;Code Zen /&#62; &#187; php</title>
	<atom:link href="http://www.code-zen.net/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.code-zen.net</link>
	<description>Peter Anselmo&#039;s Home on the Web</description>
	<lastBuildDate>Thu, 17 Jun 2010 15:16:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using Custom Profile Field Data in Buddypress Templates</title>
		<link>http://www.code-zen.net/2009/using-custom-profile-field-data-in-buddypress-templates/</link>
		<comments>http://www.code-zen.net/2009/using-custom-profile-field-data-in-buddypress-templates/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 22:48:14 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[BuddyPress]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.code-zen.net/?p=325</guid>
		<description><![CDATA[I ran into what I thought would be fairly common need for Buddypress theme development, the ability to pull data from a custom user profile field and display it.  After searching a bit, I could only find way to pull either random fields, or all of the fields together.  So after digging around [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into what I thought would be fairly common need for Buddypress theme development, the ability to pull data from a custom user profile field and display it.  After searching a bit, I could only find way to pull either random fields, or all of the fields together.  So after digging around in the core files, I found the pieces to put together my own function for the task.</p>
<p>1. <strong>Create the file &#8220;bp-custom.php&#8221;</strong> and place it directly in the plugins folder.  Note, do not place it in the &#8220;buddypress&#8221; folder, otherwise it will be overwritten when upgrading.  If the file exists, simply append to it rather than creating a new one.</p>
<p>2. <strong>Paste the following function</strong> in:</p>
<pre>function bp_the_site_member_profile_data($field_name = '', $echo = 1) {
  if( !$field_name ) {
    return false;
  }
  global $site_members_template;
  if( function_exists( 'xprofile_get_field_data' ) ) {
    $data = xprofile_get_field_data( $field_name,
                                     $site_members_template-&gt;member-&gt;id);
    if( $echo ) {
      echo "<span class="single-field-data">$data</span>";
      return true;
    } else {
      return $data;
    }
  }
}</pre>
<p>3. You can now <strong>use the function &#8216;bp_the_site_member_profile_data(&#8216;MyField&#8217;)</strong> in your templates (of course, substituting &#8216;MyField&#8217; with the one you&#8217;d like to use).  Note, this must be place inside a &#8216;Members Loop&#8217; so that the $site_members_template variable is populated.  Odds are, you&#8217;re inserting this near other profile data already in the loop, so there should be no problems.</p>
<p>UPDATE:<br />
As of BuddyPress 1.2, this functionality has been included.  While in the members loop, you can use the included function: &#8216;bp_member_profile_data( &#8216;field=the field name&#8217; )&#8217; to much the same effect.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F&amp;title=Using+Custom+Profile+Field+Data+in+Buddypress+Templates"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F&amp;title=Using+Custom+Profile+Field+Data+in+Buddypress+Templates"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F&amp;title=Using+Custom+Profile+Field+Data+in+Buddypress+Templates"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F&amp;headline=Using+Custom+Profile+Field+Data+in+Buddypress+Templates"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Using+Custom+Profile+Field+Data+in+Buddypress+Templates&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Using+Custom+Profile+Field+Data+in+Buddypress+Templates&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Using+Custom+Profile+Field+Data+in+Buddypress+Templates&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Using+Custom+Profile+Field+Data+in+Buddypress+Templates&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Using+Custom+Profile+Field+Data+in+Buddypress+Templates&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F&amp;title=Using+Custom+Profile+Field+Data+in+Buddypress+Templates&amp;summary=&amp;source="><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/reader/link?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fusing-custom-profile-field-data-in-buddypress-templates%2F&amp;title=Using+Custom+Profile+Field+Data+in+Buddypress+Templates"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2009/using-custom-profile-field-data-in-buddypress-templates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu Server Setup Checklist</title>
		<link>http://www.code-zen.net/2009/ubuntu-server-setup-checklist/</link>
		<comments>http://www.code-zen.net/2009/ubuntu-server-setup-checklist/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 01:51:50 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ufw]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://www.code-zen.net/?p=281</guid>
		<description><![CDATA[I&#8217;ve now set up half a dozen or so Ubuntu Server installations over the past year or two.  For the last few, I created a checklist to make sure I don&#8217;t leave any of the smaller, less obvious things out.  I present it here, completely unmodified.  Note, this is more of a preliminary checklist, as [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-290" title="Ubuntu Logo" src="http://c0876662.cdn.cloudfiles.rackspacecloud.com/ubu.gif" alt="" width="70" height="68" />I&#8217;ve now set up half a dozen or so Ubuntu Server installations over the past year or two.  For the last few, I created a checklist to make sure I don&#8217;t leave any of the smaller, less obvious things out.  I present it here, completely unmodified.  Note, this is more of a preliminary checklist, as it doesn&#8217;t include installation of Apache, MySql, PHP or any other programs such as Postfix.  Basically, I&#8217;ll perform these steps regardless of whether It&#8217;ll be a web or mail server.  These also assume you like the vi text editor, if not, you can substitute emacs, nano, or whatever your preference when neccesary.  Also, some of these are already done depending on your server host.</p>
<p><span style="text-decoration: underline;">Time/Date/Language</span><br />
Fix Locale Warnings:<br />
# apt-get install language-pack-en</p>
<p>Set Timezone:<br />
# dpkg-reconfigure tzdata</p>
<p>Install Time Daemon:<br />
# apt-get install ntp</p>
<p><span style="text-decoration: underline;">General</span><br />
Install Manual Pages:<br />
# apt-get install man</p>
<p>Add Domain name<br />
# vi /etc/hosts<br />
127.0.0.1	localhost<br />
123.456.789.012	computername.domain.com	computername (replace external ip)</p>
<p><span style="text-decoration: underline;">Security</span><br />
Add Administrative User (with home directory):<br />
# useradd myusername -m</p>
<p>Give Admin user Sudo Powers<br />
# visudo<br />
myusername ALL=(ALL) ALL</p>
<p>Set Admin Password<br />
# passwd myusername</p>
<p>Set Admin Shell Preference (optional)<br />
# vi /etc/passwd<br />
myusername: [...] :bash</p>
<p>Disable Root SSH Login:<br />
# vi /etc/ssh/sshd_config<br />
PermitRootLogin	no &lt;&#8211;MAKE SURE YOU CREATED ADMIN &amp; PASSWORD</p>
<p>Tighten default permissions for file &amp; directory creation:<br />
# vi /etc/profile<br />
umask	027 (no default access for others)</p>
<p>Install and Set Up Firewall<br />
# apt-get install ufw<br />
# ufw allow ssh &lt;&#8211;DO NOT FORGET THIS<br />
# ufw enable</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F&amp;title=Ubuntu+Server+Setup+Checklist"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F&amp;title=Ubuntu+Server+Setup+Checklist"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F&amp;title=Ubuntu+Server+Setup+Checklist"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F&amp;headline=Ubuntu+Server+Setup+Checklist"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Ubuntu+Server+Setup+Checklist&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Ubuntu+Server+Setup+Checklist&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Ubuntu+Server+Setup+Checklist&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Ubuntu+Server+Setup+Checklist&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Ubuntu+Server+Setup+Checklist&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F&amp;title=Ubuntu+Server+Setup+Checklist&amp;summary=&amp;source="><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/reader/link?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F&amp;title=Ubuntu+Server+Setup+Checklist"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2009/ubuntu-server-setup-checklist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic Display of the Alphabet with PHP</title>
		<link>http://www.code-zen.net/2008/dynamic-display-of-the-alphabet-with-php/</link>
		<comments>http://www.code-zen.net/2008/dynamic-display-of-the-alphabet-with-php/#comments</comments>
		<pubDate>Tue, 23 Dec 2008 21:14:07 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[ascii]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://code-zen.net/?p=138</guid>
		<description><![CDATA[Here&#8217;s a neat trick I recently used: Say you want to the display the alphabet on your web page.  The most likely scenario being for paging links to organize a directory of people or businesses. PHP has a chr() function, which displays the ASCII character for any given integer.
Rather than looping through an array with [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a neat trick I recently used: Say you want to the display the alphabet on your web page.  The most likely scenario being for paging links to organize a directory of people or businesses. PHP has a chr() function, which displays the ASCII character for any given integer.</p>
<p>Rather than looping through an array with 26 values, or worse yet, typing out 26 lines of code, just loop through the display code 26 times.</p>
<pre>&lt;?php
for ($i=65; $i&lt;=90; $i++) {
 echo chr($i);
}
?&gt;</pre>
<p>For those not familiar with ASCII mappings, values 65-90 represent the uppercase letters A-Z.  Alternately, you could use the values 97-122 for lowercase a-z.  If you wanted to mix the two (say to display uppercase, but use lowercase in the link) just use the strtoupper() or strtolower() functions inside the loop.  Here&#8217;s a more applicable sample:</p>
<pre>&lt;?php
for ($i=97; $i&lt;=122; $i++) {
 $x = chr($i);
 echo '&lt;a href="memberlist.php?alpha=' . $x . '&gt;' . strtoupper($x) . '&lt;/a&gt;';
}
?&gt;

You can see an example of both <a href="http://code-zen.net/sandbox/alphabet.php" target="_blank">applied here</a>.</pre>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F&amp;title=Dynamic+Display+of+the+Alphabet+with+PHP"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F&amp;title=Dynamic+Display+of+the+Alphabet+with+PHP"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F&amp;title=Dynamic+Display+of+the+Alphabet+with+PHP"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F&amp;headline=Dynamic+Display+of+the+Alphabet+with+PHP"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Dynamic+Display+of+the+Alphabet+with+PHP&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Dynamic+Display+of+the+Alphabet+with+PHP&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Dynamic+Display+of+the+Alphabet+with+PHP&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Dynamic+Display+of+the+Alphabet+with+PHP&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Dynamic+Display+of+the+Alphabet+with+PHP&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F&amp;title=Dynamic+Display+of+the+Alphabet+with+PHP&amp;summary=&amp;source="><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/reader/link?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fdynamic-display-of-the-alphabet-with-php%2F&amp;title=Dynamic+Display+of+the+Alphabet+with+PHP"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2008/dynamic-display-of-the-alphabet-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Month View Calendar</title>
		<link>http://www.code-zen.net/2008/php-month-view-calendar/</link>
		<comments>http://www.code-zen.net/2008/php-month-view-calendar/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 00:54:21 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://code-zen.net/?p=77</guid>
		<description><![CDATA[I recently had to develop a month view Calendar for a website I&#8217;m building.  While such a thing is very common, it presents a number of twists:

You can&#8217;t start it on the first of the month &#8211; The first will likely fall mid-week
To find the acutual first day of the week, you need to know [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had to develop a month view Calendar for a website I&#8217;m building.  While such a thing is very common, it presents a number of twists:</p>
<ul>
<li>You can&#8217;t start it on the first of the month &#8211; The first will likely fall mid-week</li>
<li>To find the acutual first day of the week, you need to know how many days are in the previous month and count backwards</li>
<li>You cannot assume 4 weeks per month -most have 5 or 6</li>
<li>you will need to use the correct number of days in the month, and then add on the correct number of days of the next month to finish the week</li>
</ul>
<p>After playing with a few algorithms, I decided to represent the month with a 2-dimensional array, one index for each week, and another for each day.  Then, you can put the actual string date in each value, or perhaps an array with that day&#8217;s events.  Without further ado:</p>
<pre>&lt;?php
//CreateMonthView -
//Takes one parameter: a unix timestamp anywhere in the month
function CreateMonthView( $now ) {

    //get numberic day of month (01-31)
    $dayOfMonth = strftime('%d', $now);
    //subtract as approptriate to get to start of month
    $monthStart = $now - (86400 * ($dayOfMonth -1));

    //get numeric day of week (0-6)
    $dayOfWeek = strftime('%w', $monthStart);

    //subtract appropriate number of days to get to the start of the week
    //this will usually be the last part of the previous month
    $calMonthStart = $monthStart - (86400 * $dayOfWeek );

    //initialize variables for while loop
    $thisWeekStart = $calMonthStart;
    $week = 1;
    $monthArray = array();

    //last day of month - text condition for while loop
    $lastDayOfMonth = mktime(23, 59, 59,
                             date("m", $now),
                             date("t", $now),
                             date("Y", $now));

    //foreach week, create a new array to hold the days
    while( $thisWeekStart &lt;= $lastDayOfMonth ) {
        $monthArray[$week] = array();

        //iterate through week - adding each day as a value
        for( $i=0; $i&lt;7; $i++) {
            //get timestamp for each day
            $dayOfWeek = $thisWeekStart + 86400 * $i;
            //convert to a and ISO date - seconds are too precise
            $date = date('Y-m-d',$dayOfWeek);

            //each day will be the value in the array
            $monthArray[$week][] = $date;
        }

        //increment sentinal variable and week counter
        $thisWeekStart = $dayOfWeek + 86400;
        $week++;
    }

    return $monthArray;
}
?&gt;</pre>
<p>Now you may be saying to yourself &#8220;okay, that&#8217;s all fine and good, but it doesn&#8217;t do anything on it&#8217;s own&#8221;, and you&#8217;d be right, it&#8217;s just a function.  To make something happen, you simply need to call it, and display the result.  Here is another snippet that does just that:</p>
<pre>&lt;?php
$month = CreateMonthView( mktime() ); //create the current month

echo '&lt;table&gt;';
foreach( $month as $week ) {
    echo '&lt;tr&gt;';

    foreach ($week as $day ) {
        if( $day == date('Y-m-d') ){
            //apply selector to distinguish today's date
            echo '&lt;td class="today"&gt;';
        } else {
            echo '&lt;td&gt;';
        }
        //reduce the complete ISO date down to the day and display it
        echo substr($day, 8, 2);
        echo '&lt;/td&gt;';
    }
    echo "&lt;/tr&gt;\n";
}
echo '&lt;/table&gt;';
?&gt;</pre>
<p>Viola!  You can certainly copy and paste this code as is, but it&#8217;s not very visually exciting. <a href="http://code-zen.net/sandbox/calendar.php" target="_blank">Here&#8217;s an example</a>. It could definitely use some styling &#8211; but I&#8217;ll leave that up to you.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F&amp;title=PHP+Month+View+Calendar"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F&amp;title=PHP+Month+View+Calendar"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F&amp;title=PHP+Month+View+Calendar"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F&amp;headline=PHP+Month+View+Calendar"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=PHP+Month+View+Calendar&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=PHP+Month+View+Calendar&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=PHP+Month+View+Calendar&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=PHP+Month+View+Calendar&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=PHP+Month+View+Calendar&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F&amp;title=PHP+Month+View+Calendar&amp;summary=&amp;source="><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/reader/link?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fphp-month-view-calendar%2F&amp;title=PHP+Month+View+Calendar"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2008/php-month-view-calendar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Hash Generator</title>
		<link>http://www.code-zen.net/2008/quick-hash-generator/</link>
		<comments>http://www.code-zen.net/2008/quick-hash-generator/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 16:49:44 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://code-zen.net/?p=71</guid>
		<description><![CDATA[I often find myself quickly needing the 1-way encrypted value (hash) of a string.  Most often, it&#8217;s to securely store an individual password into a database or script.  Rather than temporarily hard-coding the plain text to see what PHP will generate, I wrote a little reusable script to generate hash values.  Anyone [...]]]></description>
			<content:encoded><![CDATA[<p>I often find myself quickly needing the 1-way encrypted value (hash) of a string.  Most often, it&#8217;s to securely store an individual password into a database or script.  Rather than temporarily hard-coding the plain text to see what PHP will generate, I wrote a little reusable script to generate hash values.  Anyone who might find it useful can <a href="http://www.code-zen.net/sandbox/hash.php" target="_blank">find it here</a>.  If you&#8217;re paranoid about security, you can find a <a href="https://www.code-zen.net/sandbox/hash.php" target="_blank">secure version here</a>, although you may get a warning about my self-signed certificate.</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fquick-hash-generator%2F&amp;title=Quick+Hash+Generator"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fquick-hash-generator%2F&amp;title=Quick+Hash+Generator"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fquick-hash-generator%2F&amp;title=Quick+Hash+Generator"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fquick-hash-generator%2F&amp;headline=Quick+Hash+Generator"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Quick+Hash+Generator&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fquick-hash-generator%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Quick+Hash+Generator&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fquick-hash-generator%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Quick+Hash+Generator&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fquick-hash-generator%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Quick+Hash+Generator&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fquick-hash-generator%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Quick+Hash+Generator&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fquick-hash-generator%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fquick-hash-generator%2F&amp;title=Quick+Hash+Generator&amp;summary=&amp;source="><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fquick-hash-generator%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2008%2Fquick-hash-generator%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/reader/link?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fquick-hash-generator%2F&amp;title=Quick+Hash+Generator"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2008/quick-hash-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get a Random Row from Database</title>
		<link>http://www.code-zen.net/2008/get-a-random-row-from-database/</link>
		<comments>http://www.code-zen.net/2008/get-a-random-row-from-database/#comments</comments>
		<pubDate>Sun, 30 Nov 2008 01:35:01 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://code-zen.net/?p=23</guid>
		<description><![CDATA[I had an app the other day that required a single random row to be displayed from the database. It&#8217;s an easy task, but I tripped on it for a second. Here was my impulse:
//Get the total number of rows from the MySQL database
$query = "SELECT COUNT(*) as total FROM table";
$result = mysql_query( $query);
$rows = [...]]]></description>
			<content:encoded><![CDATA[<p>I had an app the other day that required a single random row to be displayed from the database. It&#8217;s an easy task, but I tripped on it for a second. Here was my impulse:</p>
<pre class="content">//Get the total number of rows from the MySQL database
$query = "SELECT COUNT(*) as total FROM table";
$result = mysql_query( $query);
$rows = mysql_fetch_assoc( $result );

//Let PHP choose a random row
//pick a number between 1 &amp; the total
$row = rand(1, $rows['total'])

//Now get that row
$query = "SELECT * FROM table LIMIT($row, 1)";
$result = mysql_query( $query);</pre>
<p>After typing that out, I realized that I had take the long way round the problem. Very similar to taking the Misty Mountain Path rather than the Mines of Moria. Here&#8217;s a better way:</p>
<pre>//Get a random row from the database
$query = "SELECT * FROM table ORDER BY RAND() LIMIT 1";
$result = mysql_query( $query );</pre>
<p>Much better.  Gimley the dwarf would be proud</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fget-a-random-row-from-database%2F&amp;title=Get+a+Random+Row+from+Database"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fget-a-random-row-from-database%2F&amp;title=Get+a+Random+Row+from+Database"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fget-a-random-row-from-database%2F&amp;title=Get+a+Random+Row+from+Database"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fget-a-random-row-from-database%2F&amp;headline=Get+a+Random+Row+from+Database"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Get+a+Random+Row+from+Database&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fget-a-random-row-from-database%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Get+a+Random+Row+from+Database&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fget-a-random-row-from-database%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Get+a+Random+Row+from+Database&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fget-a-random-row-from-database%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Get+a+Random+Row+from+Database&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fget-a-random-row-from-database%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Get+a+Random+Row+from+Database&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fget-a-random-row-from-database%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fget-a-random-row-from-database%2F&amp;title=Get+a+Random+Row+from+Database&amp;summary=&amp;source="><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fget-a-random-row-from-database%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2008%2Fget-a-random-row-from-database%2F"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/reader/link?url=http%3A%2F%2Fwww.code-zen.net%2F2008%2Fget-a-random-row-from-database%2F&amp;title=Get+a+Random+Row+from+Database"><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2008/get-a-random-row-from-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
