<?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/"
xmlns:series="http://unfoldingneurons.com/"
> <channel><title>Comments on: Pretty Word Wrapper with MooTools or&#160;PHP</title> <atom:link href="http://davidwalsh.name/word-wrap-mootools-php/feed" rel="self" type="application/rss+xml" /><link>http://davidwalsh.name/word-wrap-mootools-php</link> <description>Legendary scribbles about JavaScript, HTML5, AJAX, PHP, CSS, and ∞.</description> <lastBuildDate>Thu, 09 Feb 2012 10:59:12 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3</generator> <item><title>By: Simon</title><link>http://davidwalsh.name/word-wrap-mootools-php/comment-page-1#comment-27673</link> <dc:creator>Simon</dc:creator> <pubDate>Sat, 19 Nov 2011 18:07:14 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3505#comment-27673</guid> <description>I can&#039;t get this to work. Am I doing something wrong?I add the php code into the head but it doesn&#039;t add a non-break-spaceCan anyone point me to a working example?</description> <content:encoded><![CDATA[<p>I can&#8217;t get this to work. Am I doing something wrong?</p><p>I add the php code into the head but it doesn&#8217;t add a non-break-space</p><p>Can anyone point me to a working example?</p> ]]></content:encoded> </item> <item><title>By: Greg</title><link>http://davidwalsh.name/word-wrap-mootools-php/comment-page-1#comment-11890</link> <dc:creator>Greg</dc:creator> <pubDate>Tue, 15 Sep 2009 13:45:09 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3505#comment-11890</guid> <description>You can stream line you code a little by changing thearr[arr.length - 2] += &#039;&#160;&#039; + arr[arr.length - 1];arr.pop();with
arr[arr.length - 2] += &#039;&#160;&#039; + arr.pop();You can do the same with the PHP too.since the array Pop method both removes the last item in the array AND returns its value.  Though this will not make a huge impact on the performance of the code it is code practice.</description> <content:encoded><![CDATA[<p>You can stream line you code a little by changing the</p><p>arr[arr.length - 2] += &#8216;&nbsp;&#8217; + arr[arr.length - 1];</p><p>arr.pop();</p><p>with<br
/> arr[arr.length - 2] += &#8216;&nbsp;&#8217; + arr.pop();</p><p>You can do the same with the PHP too.</p><p>since the array Pop method both removes the last item in the array AND returns its value.  Though this will not make a huge impact on the performance of the code it is code practice.</p> ]]></content:encoded> </item> <item><title>By: Dutchie</title><link>http://davidwalsh.name/word-wrap-mootools-php/comment-page-1#comment-11585</link> <dc:creator>Dutchie</dc:creator> <pubDate>Fri, 28 Aug 2009 18:56:41 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3505#comment-11585</guid> <description>Hmm.. I like this idea, but still the www is not a thing like print is in combination with InDesign (I reffuse to mention Quark, lol), which have advanced widow cut rules etc. build in. I mean, it&#039;s not always appropriate to move the two last words to the next line as a default in various languages/situations.. then I rather blame the browser&#039;s neanderthaler rudeness :)But again, it&#039;s an original idea which probably makes the headlines in most cases a bit nicer, and the JS is small (and php is fast).</description> <content:encoded><![CDATA[<p>Hmm.. I like this idea, but still the www is not a thing like print is in combination with InDesign (I reffuse to mention Quark, lol), which have advanced widow cut rules etc. build in. I mean, it&#8217;s not always appropriate to move the two last words to the next line as a default in various languages/situations.. then I rather blame the browser&#8217;s neanderthaler rudeness :)</p><p>But again, it&#8217;s an original idea which probably makes the headlines in most cases a bit nicer, and the JS is small (and php is fast).</p> ]]></content:encoded> </item> <item><title>By: Adriaan</title><link>http://davidwalsh.name/word-wrap-mootools-php/comment-page-1#comment-11579</link> <dc:creator>Adriaan</dc:creator> <pubDate>Fri, 28 Aug 2009 15:41:04 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3505#comment-11579</guid> <description>Ineresting approach, I use a little function that cuts the text off after a certain amount of characters and then adds ... to it.  Of course I&#039;m checking correctly for things like, cutting at the first space before the max amount of chars, taking care of commas and hyphens, etc</description> <content:encoded><![CDATA[<p>Ineresting approach, I use a little function that cuts the text off after a certain amount of characters and then adds &#8230; to it.  Of course I&#8217;m checking correctly for things like, cutting at the first space before the max amount of chars, taking care of commas and hyphens, etc</p> ]]></content:encoded> </item> <item><title>By: David Walsh</title><link>http://davidwalsh.name/word-wrap-mootools-php/comment-page-1#comment-11578</link> <dc:creator>David Walsh</dc:creator> <pubDate>Fri, 28 Aug 2009 14:44:45 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3505#comment-11578</guid> <description>&lt;p&gt;Thanks Francis!  Stupid WordPress...&lt;/p&gt;</description> <content:encoded><![CDATA[<p>Thanks Francis!  Stupid WordPress&#8230;</p> ]]></content:encoded> </item> <item><title>By: Francis</title><link>http://davidwalsh.name/word-wrap-mootools-php/comment-page-1#comment-11577</link> <dc:creator>Francis</dc:creator> <pubDate>Fri, 28 Aug 2009 14:43:02 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3505#comment-11577</guid> <description>Took me a while to understand what this was doing until I noticed that the &amp;nbsp is replaced by a blank space &#039; &#039; in the code!
Should read: $arr[count($arr) - 2].= &#039;&amp;nbsp&#039;.$arr[count($arr) - 1];</description> <content:encoded><![CDATA[<p>Took me a while to understand what this was doing until I noticed that the &amp;nbsp is replaced by a blank space &#8216; &#8216; in the code!<br
/> Should read: $arr[count($arr) - 2].= &#8216;&amp;nbsp&#8217;.$arr[count($arr) - 1];</p> ]]></content:encoded> </item> <item><title>By: David Walsh</title><link>http://davidwalsh.name/word-wrap-mootools-php/comment-page-1#comment-11576</link> <dc:creator>David Walsh</dc:creator> <pubDate>Fri, 28 Aug 2009 14:40:58 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3505#comment-11576</guid> <description>&lt;p&gt;@Chris the Developer:  How so?&lt;/p&gt;</description> <content:encoded><![CDATA[<p>@Chris the Developer:  How so?</p> ]]></content:encoded> </item> <item><title>By: Chris the Developer</title><link>http://davidwalsh.name/word-wrap-mootools-php/comment-page-1#comment-11575</link> <dc:creator>Chris the Developer</dc:creator> <pubDate>Fri, 28 Aug 2009 14:36:20 +0000</pubDate> <guid
isPermaLink="false">http://davidwalsh.name/?p=3505#comment-11575</guid> <description>Wouldn&#039;t it be more safe-mode friendly if you used document.getElements() instead of $$?</description> <content:encoded><![CDATA[<p>Wouldn&#8217;t it be more safe-mode friendly if you used document.getElements() instead of $$?</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (User agent is rejected)
Database Caching 1/15 queries in 0.007 seconds using disk: basic
Object Caching 735/736 objects using disk: basic

Served from: davidwalsh.name @ 2012-02-09 08:11:33 -->
