<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: PHP: A function to return the first n words from a string</title>
	<atom:link href="http://www.nutt.net/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nutt.net/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/</link>
	<description>Random articles on whatever I feel like...</description>
	<lastBuildDate>Wed, 17 Mar 2010 08:08:27 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Edvan</title>
		<link>http://www.nutt.net/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/comment-page-1/#comment-87117</link>
		<dc:creator>Edvan</dc:creator>
		<pubDate>Fri, 04 Sep 2009 18:10:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nutt.net/archive/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/56.html#comment-87117</guid>
		<description>Here go another way:

function first_word()
{
   preg_match(&#039;/[^ ]*/&#039;, $username, $matches);
   return $matches[0];
}</description>
		<content:encoded><![CDATA[<p>Here go another way:</p>
<p>function first_word()<br />
{<br />
   preg_match(&#8216;/[^ ]*/&#8217;, $username, $matches);<br />
   return $matches[0];<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prem ypi</title>
		<link>http://www.nutt.net/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/comment-page-1/#comment-83883</link>
		<dc:creator>prem ypi</dc:creator>
		<pubDate>Mon, 29 Jun 2009 18:35:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nutt.net/archive/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/56.html#comment-83883</guid>
		<description>This is really helpful. I had to pick up first name of the user and it worked like charm</description>
		<content:encoded><![CDATA[<p>This is really helpful. I had to pick up first name of the user and it worked like charm</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.nutt.net/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/comment-page-1/#comment-71543</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Fri, 13 Mar 2009 10:55:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nutt.net/archive/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/56.html#comment-71543</guid>
		<description>Thanks.  You&#039;re right, it should be if string contains fewer words then...</description>
		<content:encoded><![CDATA[<p>Thanks.  You&#8217;re right, it should be if string contains fewer words then&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Something</title>
		<link>http://www.nutt.net/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/comment-page-1/#comment-71467</link>
		<dc:creator>Tom Something</dc:creator>
		<pubDate>Thu, 12 Mar 2009 23:58:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nutt.net/archive/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/56.html#comment-71467</guid>
		<description>...aaaaand a typo in my own comment. Go me!</description>
		<content:encoded><![CDATA[<p>&#8230;aaaaand a typo in my own comment. Go me!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Something</title>
		<link>http://www.nutt.net/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/comment-page-1/#comment-71466</link>
		<dc:creator>Tom Something</dc:creator>
		<pubDate>Thu, 12 Mar 2009 23:57:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nutt.net/archive/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/56.html#comment-71466</guid>
		<description>Thanks. Short and simple is the way to go, and now I have a practical example of array_splice to do other stuff with.

Noticed a small typo in your inline comment:

&quot;If string contains more words than $wordsreturned, the entire string is returned.&quot;

should probably read &quot;Unless string contains...&quot;

of &quot;If string contains &lt;= $wordsreturned...&quot;</description>
		<content:encoded><![CDATA[<p>Thanks. Short and simple is the way to go, and now I have a practical example of array_splice to do other stuff with.</p>
<p>Noticed a small typo in your inline comment:</p>
<p>&#8220;If string contains more words than $wordsreturned, the entire string is returned.&#8221;</p>
<p>should probably read &#8220;Unless string contains&#8230;&#8221;</p>
<p>of &#8220;If string contains &lt;= $wordsreturned&#8230;&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fest</title>
		<link>http://www.nutt.net/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/comment-page-1/#comment-58734</link>
		<dc:creator>fest</dc:creator>
		<pubDate>Sat, 07 Feb 2009 12:08:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nutt.net/archive/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/56.html#comment-58734</guid>
		<description>I&#039;ll definately drink a sip of beer for your health. Thanks for the function ;)</description>
		<content:encoded><![CDATA[<p>I&#8217;ll definately drink a sip of beer for your health. Thanks for the function ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bogatyr</title>
		<link>http://www.nutt.net/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/comment-page-1/#comment-56319</link>
		<dc:creator>bogatyr</dc:creator>
		<pubDate>Sun, 01 Feb 2009 04:14:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nutt.net/archive/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/56.html#comment-56319</guid>
		<description>Just saved me that much work. Much thanks.</description>
		<content:encoded><![CDATA[<p>Just saved me that much work. Much thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luke</title>
		<link>http://www.nutt.net/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/comment-page-1/#comment-44473</link>
		<dc:creator>Luke</dc:creator>
		<pubDate>Mon, 15 Dec 2008 15:07:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nutt.net/archive/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/56.html#comment-44473</guid>
		<description>Thanks!

Very useful.</description>
		<content:encoded><![CDATA[<p>Thanks!</p>
<p>Very useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.nutt.net/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/comment-page-1/#comment-41458</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Sun, 30 Nov 2008 04:54:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nutt.net/archive/2004/12/29/php-a-function-to-return-the-first-n-words-from-a-string/56.html#comment-41458</guid>
		<description>Thanks.  Very usefull.  Just cut n pasted into my program and ran.</description>
		<content:encoded><![CDATA[<p>Thanks.  Very usefull.  Just cut n pasted into my program and ran.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
