<?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: Trim a String Without Cutting Any Words</title>
	<atom:link href="http://www.justin-cook.com/wp/2006/06/27/php-trim-a-string-without-cutting-any-words/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.justin-cook.com/wp/2006/06/27/php-trim-a-string-without-cutting-any-words/</link>
	<description>A web, technology, programming and SEO blog by Justin Cook</description>
	<lastBuildDate>Wed, 10 Mar 2010 21:22:18 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Webmaster Liam</title>
		<link>http://www.justin-cook.com/wp/2006/06/27/php-trim-a-string-without-cutting-any-words/comment-page-1/#comment-156478</link>
		<dc:creator>Webmaster Liam</dc:creator>
		<pubDate>Tue, 16 Feb 2010 13:48:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.justin-cook.com/wp/2006/06/27/php-trim-a-string-without-cutting-any-words/#comment-156478</guid>
		<description>Great function mate.  I will use this over and over again. 

Thanks</description>
		<content:encoded><![CDATA[<p>Great function mate.  I will use this over and over again. </p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonny</title>
		<link>http://www.justin-cook.com/wp/2006/06/27/php-trim-a-string-without-cutting-any-words/comment-page-1/#comment-156426</link>
		<dc:creator>Jonny</dc:creator>
		<pubDate>Mon, 25 Jan 2010 14:06:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.justin-cook.com/wp/2006/06/27/php-trim-a-string-without-cutting-any-words/#comment-156426</guid>
		<description>Or you can use:

function Cut($string, $max_length)
{
if (strlen($string) &gt; $max_length)
{
$string = substr($string, 0, $max_length);
$pos = strrpos($string, ” “);
if($pos === false)
{
return substr($string, 0, $max_length).”…”;
}
return substr($string, 0, $pos).”…”;
}
else
{
return $string;
}
}</description>
		<content:encoded><![CDATA[<p>Or you can use:</p>
<p>function Cut($string, $max_length)<br />
{<br />
if (strlen($string) &gt; $max_length)<br />
{<br />
$string = substr($string, 0, $max_length);<br />
$pos = strrpos($string, ” “);<br />
if($pos === false)<br />
{<br />
return substr($string, 0, $max_length).”…”;<br />
}<br />
return substr($string, 0, $pos).”…”;<br />
}<br />
else<br />
{<br />
return $string;<br />
}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: [PHP] Shortening Text from DB</title>
		<link>http://www.justin-cook.com/wp/2006/06/27/php-trim-a-string-without-cutting-any-words/comment-page-1/#comment-156407</link>
		<dc:creator>[PHP] Shortening Text from DB</dc:creator>
		<pubDate>Wed, 20 Jan 2010 11:40:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.justin-cook.com/wp/2006/06/27/php-trim-a-string-without-cutting-any-words/#comment-156407</guid>
		<description>[...] PHP: Trim a String Without Cutting Any Words  (I make no assertion about the licensing position for that snippet, check it yourself on the site.) [...]</description>
		<content:encoded><![CDATA[<p>[...] PHP: Trim a String Without Cutting Any Words  (I make no assertion about the licensing position for that snippet, check it yourself on the site.) [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.169 seconds -->
