<?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 Basic: Come limitare la lunghezza del testo</title>
	<atom:link href="http://www.nemoprincess.it/blog/programmazione/php/php-basic-come-limitare-la-lunghezza-del-testo.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.nemoprincess.it/blog/programmazione/php/php-basic-come-limitare-la-lunghezza-del-testo.html</link>
	<description>Blog su Wordpress, Seo e Web Design</description>
	<lastBuildDate>Fri, 26 Feb 2010 01:30:50 +0100</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Zave</title>
		<link>http://www.nemoprincess.it/blog/programmazione/php/php-basic-come-limitare-la-lunghezza-del-testo.html/comment-page-1#comment-2550</link>
		<dc:creator>Zave</dc:creator>
		<pubDate>Wed, 28 Oct 2009 09:22:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.nemoprincess.it/blog/?p=2916#comment-2550</guid>
		<description>&lt;a href=&#039;#comment-2549&#039; rel=&quot;nofollow&quot;&gt;@Zave&lt;/a&gt; - Ok, penso di esserci riuscito ;)
&lt;code&gt;
function substrwords($text,$maxchar,$end=&#039;...&#039;){
	if(strlen($text)&gt;$maxchar){
		$words=explode(&quot; &quot;,$text);
		$output = &#039;&#039;;
		$i=0;
		while(1){
			$length = (strlen($output)+strlen($words[$i]));
			if($length&gt;$maxchar){
				break;
				}else{
					$output = $output.&quot; &quot;.$words[$i];
					++$i;
				};
		};
		}else{
			$end=&#039;&#039;;
			$output = $text;
		}
		return $output.$end;
	}
&lt;/code&gt;&lt;div class=&quot;comment-remix-meta&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;replyto&quot; onclick=&quot;replyto(&#039;2550&#039;,&#039;Zave&#039;); return false;&quot;&gt;Replica&lt;/a&gt;  - &lt;a href=&quot;#&quot; class=&quot;quote&quot; onclick=&quot;quote(&#039;2550&#039;,&#039;Zave&#039;,&#039;&lt;a href=\&#039;#comment-2549\&#039; rel=\&quot;nofollow\&quot;&gt;@Zave&lt;\/a&gt; - Ok, penso di esserci riuscito ;)\r\n&lt;code&gt;\r\nfunction substrwords($text,$maxchar,$end=\&#039;...\&#039;){\r\n	if(strlen($text)&gt;$maxchar){\r\n		$words=explode(\&quot; \&quot;,$text);\r\n		$output = \&#039;\&#039;;\r\n		$i=0;\r\n		while(1){\r\n			$length = (strlen($output)+strlen($words&#91;$i&#93;));\r\n			if($length&gt;$maxchar){\r\n				break;\r\n				}else{\r\n					$output = $output.\&quot; \&quot;.$words&#91;$i&#93;;\r\n					++$i;\r\n				};\r\n		};\r\n		}else{\r\n			$end=\&#039;\&#039;;\r\n			$output = $text;\r\n		}\r\n		return $output.$end;\r\n	}\r\n&lt;\/code&gt;&#039;); return false;&quot;&gt;Quota&lt;/a&gt;&lt;/div&gt;</description>
		<content:encoded><![CDATA[<p><a href='#comment-2549'>@Zave</a> &#8211; Ok, penso di esserci riuscito <img src='http://www.nemoprincess.it/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
<code><br />
function substrwords($text,$maxchar,$end='...'){<br />
	if(strlen($text)&gt;$maxchar){<br />
		$words=explode(" ",$text);<br />
		$output = '';<br />
		$i=0;<br />
		while(1){<br />
			$length = (strlen($output)+strlen($words[$i]));<br />
			if($length&gt;$maxchar){<br />
				break;<br />
				}else{<br />
					$output = $output." ".$words[$i];<br />
					++$i;<br />
				};<br />
		};<br />
		}else{<br />
			$end='';<br />
			$output = $text;<br />
		}<br />
		return $output.$end;<br />
	}<br />
</code>
<div class="comment-remix-meta"><a href="#" class="replyto" onclick="replyto('2550','Zave'); return false;">Replica</a>  &#8211; <a href="#" class="quote" onclick="quote('2550','Zave','&lt;a href=\'#comment-2549\' rel=\&quot;\&quot;&gt;@Zave&lt;\/a&gt; - Ok, penso di esserci riuscito ;)\r\n&lt;code&gt;\r\nfunction substrwords($text,$maxchar,$end=\'...\'){\r\n	if(strlen($text)&amp;gt;$maxchar){\r\n		$words=explode(\&quot; \&quot;,$text);\r\n		$output = \'\';\r\n		$i=0;\r\n		while(1){\r\n			$length = (strlen($output)+strlen($words&amp;#91;$i&amp;#93;));\r\n			if($length&amp;gt;$maxchar){\r\n				break;\r\n				}else{\r\n					$output = $output.\&quot; \&quot;.$words&amp;#91;$i&amp;#93;;\r\n					++$i;\r\n				};\r\n		};\r\n		}else{\r\n			$end=\'\';\r\n			$output = $text;\r\n		}\r\n		return $output.$end;\r\n	}\r\n&lt;\/code&gt;'); return false;">Quota</a></div>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zave</title>
		<link>http://www.nemoprincess.it/blog/programmazione/php/php-basic-come-limitare-la-lunghezza-del-testo.html/comment-page-1#comment-2549</link>
		<dc:creator>Zave</dc:creator>
		<pubDate>Wed, 28 Oct 2009 09:15:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.nemoprincess.it/blog/?p=2916#comment-2549</guid>
		<description>Ciao, sto imparando ora i rudimenti del php e questa funzione è esattamente quello che stavo cercando!
Un&#039;unico problema: i puntini vengono messi alla fine di ogni stringa, indipendentemente dal fatto che sia stata &quot;tagliata&quot; o meno..
Sto cercando di correggerla, ma sono ancora in alto mare eheh

Grazie
Davide&lt;div class=&quot;comment-remix-meta&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;replyto&quot; onclick=&quot;replyto(&#039;2549&#039;,&#039;Zave&#039;); return false;&quot;&gt;Replica&lt;/a&gt;  - &lt;a href=&quot;#&quot; class=&quot;quote&quot; onclick=&quot;quote(&#039;2549&#039;,&#039;Zave&#039;,&#039;Ciao, sto imparando ora i rudimenti del php e questa funzione &#195;&#168; esattamente quello che stavo cercando!\r\nUn\&#039;unico problema: i puntini vengono messi alla fine di ogni stringa, indipendentemente dal fatto che sia stata \&quot;tagliata\&quot; o meno..\r\nSto cercando di correggerla, ma sono ancora in alto mare eheh\r\n\r\nGrazie\r\nDavide&#039;); return false;&quot;&gt;Quota&lt;/a&gt;&lt;/div&gt;</description>
		<content:encoded><![CDATA[<p>Ciao, sto imparando ora i rudimenti del php e questa funzione è esattamente quello che stavo cercando!<br />
Un&#8217;unico problema: i puntini vengono messi alla fine di ogni stringa, indipendentemente dal fatto che sia stata &#8220;tagliata&#8221; o meno..<br />
Sto cercando di correggerla, ma sono ancora in alto mare eheh</p>
<p>Grazie<br />
Davide
<div class="comment-remix-meta"><a href="#" class="replyto" onclick="replyto('2549','Zave'); return false;">Replica</a>  &#8211; <a href="#" class="quote" onclick="quote('2549','Zave','Ciao, sto imparando ora i rudimenti del php e questa funzione &Atilde;&uml; esattamente quello che stavo cercando!\r\nUn\'unico problema: i puntini vengono messi alla fine di ogni stringa, indipendentemente dal fatto che sia stata \&quot;tagliata\&quot; o meno..\r\nSto cercando di correggerla, ma sono ancora in alto mare eheh\r\n\r\nGrazie\r\nDavide'); return false;">Quota</a></div>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->