<?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: Creating a string exerpt elegantly</title>
	<atom:link href="http://aidanlister.com/2004/04/creating-a-string-exerpt-elegantly/feed/" rel="self" type="application/rss+xml" />
	<link>http://aidanlister.com/2004/04/creating-a-string-exerpt-elegantly/</link>
	<description>Code is poetry</description>
	<lastBuildDate>Mon, 06 Sep 2010 12:12:37 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Damianhill</title>
		<link>http://aidanlister.com/2004/04/creating-a-string-exerpt-elegantly/comment-page-1/#comment-551</link>
		<dc:creator>Damianhill</dc:creator>
		<pubDate>Sun, 18 Jun 2006 20:55:34 +0000</pubDate>
		<guid isPermaLink="false">http://aidanlister.com/?p=73#comment-551</guid>
		<description>Thanks for the work you have shared.  It will save me hours (days).

Bookmarked and blogged.</description>
		<content:encoded><![CDATA[<p>Thanks for the work you have shared.  It will save me hours (days).</p>
<p>Bookmarked and blogged.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adpaster</title>
		<link>http://aidanlister.com/2004/04/creating-a-string-exerpt-elegantly/comment-page-1/#comment-267</link>
		<dc:creator>Adpaster</dc:creator>
		<pubDate>Sat, 19 Mar 2005 16:47:50 +0000</pubDate>
		<guid isPermaLink="false">http://aidanlister.com/?p=73#comment-267</guid>
		<description>My question is similiar to ngb55@hotmail.com. I want to find the total number of .(periods) in a text.  If the text have a certain number of .(periods), divide the number by 3 and end the sentence at the period.   If not print the text. In short, I am trying to print 1/3 of the text if the . (periods) total a certain number. And I will add a hyperlink using the words (more details).</description>
		<content:encoded><![CDATA[<p>My question is similiar to <a href="mailto:ngb55@hotmail.com">ngb55@hotmail.com</a>. I want to find the total number of .(periods) in a text.  If the text have a certain number of .(periods), divide the number by 3 and end the sentence at the period.   If not print the text. In short, I am trying to print 1/3 of the text if the . (periods) total a certain number. And I will add a hyperlink using the words (more details).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thecelestialcelebi</title>
		<link>http://aidanlister.com/2004/04/creating-a-string-exerpt-elegantly/comment-page-1/#comment-233</link>
		<dc:creator>Thecelestialcelebi</dc:creator>
		<pubDate>Sun, 20 Feb 2005 07:00:05 +0000</pubDate>
		<guid isPermaLink="false">http://aidanlister.com/?p=73#comment-233</guid>
		<description>&quot; nice, now imagine your string contained special characters of the kind &quot;&#1114;&quot;.&quot;

You don&#039;t do that. You do the chopping first, then htmlentities(), because &#039; and &#1114; in length is equal (don&#039;t know if &#1114; is &#039;, but it&#039;s just an example).</description>
		<content:encoded><![CDATA[<p>&#8221; nice, now imagine your string contained special characters of the kind &#8220;&#1114;&#8221;.&#8221;</p>
<p>You don&#8217;t do that. You do the chopping first, then htmlentities(), because &#8216; and &#1114; in length is equal (don&#8217;t know if &#1114; is &#8216;, but it&#8217;s just an example).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simo</title>
		<link>http://aidanlister.com/2004/04/creating-a-string-exerpt-elegantly/comment-page-1/#comment-4</link>
		<dc:creator>Simo</dc:creator>
		<pubDate>Fri, 05 Nov 2004 00:37:01 +0000</pubDate>
		<guid isPermaLink="false">http://aidanlister.com/?p=73#comment-4</guid>
		<description>nice, now imagine your string contained special characters of the kind &quot;&#1114;&quot;.
It would be great to have a function that considers these as one character each and therefore avoid returning strings like : &quot;This is a substring &amp;1 ...&quot;

I&#039;m interested if you could find a solution. Please email me!</description>
		<content:encoded><![CDATA[<p>nice, now imagine your string contained special characters of the kind &#8220;&#1114;&#8221;.<br />
It would be great to have a function that considers these as one character each and therefore avoid returning strings like : &#8220;This is a substring &#038;1 &#8230;&#8221;</p>
<p>I&#8217;m interested if you could find a solution. Please email me!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://aidanlister.com/2004/04/creating-a-string-exerpt-elegantly/comment-page-1/#comment-57</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 05 Nov 2004 00:37:01 +0000</pubDate>
		<guid isPermaLink="false">http://aidanlister.com/?p=73#comment-57</guid>
		<description>Hi:  I came across your code to shorten strings and URLs.  I need to figure out how to shorten a string, stopping it not at a certain number of characters, but rather at the first instance of a period and space (end of sentence)  Let me explain:  The string consists of many sentences.  I want only the first sentence to appear.  I want the funtion to read the string and stop at the first occurence of &quot;. &quot; which would indicate the end of a first sentence.  I do not want the first sentence to end in the middle of a word, so indicating the number of characters will not work.  Can you help?  Many thanks inadvance.  Norman Brown

[Editor&#039;s Note: Search for the first occurence of a full stop using strpos(). Then substr() to get that portion of the string.]</description>
		<content:encoded><![CDATA[<p>Hi:  I came across your code to shorten strings and URLs.  I need to figure out how to shorten a string, stopping it not at a certain number of characters, but rather at the first instance of a period and space (end of sentence)  Let me explain:  The string consists of many sentences.  I want only the first sentence to appear.  I want the funtion to read the string and stop at the first occurence of &#8220;. &#8221; which would indicate the end of a first sentence.  I do not want the first sentence to end in the middle of a word, so indicating the number of characters will not work.  Can you help?  Many thanks inadvance.  Norman Brown</p>
<p>[Editor's Note: Search for the first occurence of a full stop using strpos(). Then substr() to get that portion of the string.]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cjpa</title>
		<link>http://aidanlister.com/2004/04/creating-a-string-exerpt-elegantly/comment-page-1/#comment-58</link>
		<dc:creator>Cjpa</dc:creator>
		<pubDate>Fri, 05 Nov 2004 00:37:01 +0000</pubDate>
		<guid isPermaLink="false">http://aidanlister.com/?p=73#comment-58</guid>
		<description>ngb55@hotmail.com

you can do it like this:
$tmparr = explode(&quot;. &quot;, $string,1);
echo $temparr[0];</description>
		<content:encoded><![CDATA[<p><a href="mailto:ngb55@hotmail.com">ngb55@hotmail.com</a></p>
<p>you can do it like this:<br />
$tmparr = explode(&#8220;. &#8220;, $string,1);<br />
echo $temparr[0];</p>
]]></content:encoded>
	</item>
</channel>
</rss>
