<?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 Text Spinner</title>
	<atom:link href="http://www.madimmarketing.com/internet-marketing/php-text-spinner/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.madimmarketing.com/internet-marketing/php-text-spinner/</link>
	<description>The gathering place of mad Internet marketers</description>
	<lastBuildDate>Sat, 31 Jul 2010 13:07:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Shane Hunter</title>
		<link>http://www.madimmarketing.com/internet-marketing/php-text-spinner/comment-page-1/#comment-18576</link>
		<dc:creator>Shane Hunter</dc:creator>
		<pubDate>Thu, 08 Jul 2010 23:20:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.madimmarketing.com/?p=1000#comment-18576</guid>
		<description>Great! That worked, Thanks! =)</description>
		<content:encoded><![CDATA[<p>Great! That worked, Thanks! =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.madimmarketing.com/internet-marketing/php-text-spinner/comment-page-1/#comment-17750</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Wed, 30 Jun 2010 18:05:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.madimmarketing.com/?p=1000#comment-17750</guid>
		<description>Hi Shane,

If I understand you correctly, you just have to drop spin() function from $spin2 and $speak:

$spin2 = ‘{#1&#124;#2&#124;#3&#124;#4&#124;#5&#124;#6&#124;#7&#124;#8&#124;#9&#124;#10&#124;#11&#124;#12&#124;#13&#124;#14&#124;#15&#124;#16&#124;#17&#124;#18&#124;#19&#124;#20}’;

$speak = ‘{interesting&#124;awesome&#124;amazing&#124;cool&#124;informative&#124;wierd&#124;dope&#124;wicked&#124;neat&#124;swell&#124;inspiring&#124;audacious&#124;fullfilling&#124;kickass&#124;super cool} {site&#124;page&#124;article&#124;link&#124;file&#124;place&#124;zone&#124;method&#124;failure&#124;success story&#124;tactic}’;

$awesome = spin(&quot;{$spin2&#124;$speak}&quot;);

Note the double quotes in the above line.</description>
		<content:encoded><![CDATA[<p>Hi Shane,</p>
<p>If I understand you correctly, you just have to drop spin() function from $spin2 and $speak:</p>
<p>$spin2 = ‘{#1|#2|#3|#4|#5|#6|#7|#8|#9|#10|#11|#12|#13|#14|#15|#16|#17|#18|#19|#20}’;</p>
<p>$speak = ‘{interesting|awesome|amazing|cool|informative|wierd|dope|wicked|neat|swell|inspiring|audacious|fullfilling|kickass|super cool} {site|page|article|link|file|place|zone|method|failure|success story|tactic}’;</p>
<p>$awesome = spin(&#8220;{$spin2|$speak}&#8221;);</p>
<p>Note the double quotes in the above line.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shane Hunter</title>
		<link>http://www.madimmarketing.com/internet-marketing/php-text-spinner/comment-page-1/#comment-17744</link>
		<dc:creator>Shane Hunter</dc:creator>
		<pubDate>Wed, 30 Jun 2010 17:24:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.madimmarketing.com/?p=1000#comment-17744</guid>
		<description>function spin($s){
        preg_match(&#039;#\{(.+?)\}#is&#039;,$s,$m);
        if(empty($m)) return $s;
        $t = $m[1];
        if(strpos($t,&#039;{&#039;)!==false){
                $t = substr($t, strrpos($t,&#039;{&#039;) + 1);
        }
        $parts = explode(&quot;&#124;&quot;, $t);
        $s = preg_replace(&quot;+\{&quot;.preg_quote($t).&quot;\}+is&quot;, $parts[array_rand($parts)], $s, 1);
        return spin($s);
}


$spin2 = spin(&#039;{#1&#124;#2&#124;#3&#124;#4&#124;#5&#124;#6&#124;#7&#124;#8&#124;#9&#124;#10&#124;#11&#124;#12&#124;#13&#124;#14&#124;#15&#124;#16&#124;#17&#124;#18&#124;#19&#124;#20}&#039;);

$speak = spin(&#039;{interesting&#124;awesome&#124;amazing&#124;cool&#124;informative&#124;wierd&#124;dope&#124;wicked&#124;neat&#124;swell&#124;inspiring&#124;audacious&#124;fullfilling&#124;kickass&#124;super cool} {site&#124;page&#124;article&#124;link&#124;file&#124;place&#124;zone&#124;method&#124;failure&#124;success story&#124;tactic}&#039;);
 


What I need to do is call the results of the $spin2 function (ie: #1, #2 etc) and the results of $speak (ie: interesting failure etc...) into a new function using the same spin code:

$awesome = $spin(&#039;{$spin2&#124;$speak}&#039;);

so that $awesome will return either &quot;#1&quot; OR &quot;awesome method&quot; etc...

Right now, using the code above, I get a result returned of the actual function

ie: the echo is &quot;$spin2&quot; or &quot;$speak&quot; instead of the results OF the function.

Hopefully this makes sense, and hopefully someone can give me some useful code here.

Thanks ahead of time!!</description>
		<content:encoded><![CDATA[<p>function spin($s){<br />
        preg_match(&#8216;#\{(.+?)\}#is&#8217;,$s,$m);<br />
        if(empty($m)) return $s;<br />
        $t = $m[1];<br />
        if(strpos($t,&#8217;{&#8216;)!==false){<br />
                $t = substr($t, strrpos($t,&#8217;{&#8216;) + 1);<br />
        }<br />
        $parts = explode(&#8220;|&#8221;, $t);<br />
        $s = preg_replace(&#8220;+\{&#8220;.preg_quote($t).&#8221;\}+is&#8221;, $parts[array_rand($parts)], $s, 1);<br />
        return spin($s);<br />
}</p>
<p>$spin2 = spin(&#8216;{#1|#2|#3|#4|#5|#6|#7|#8|#9|#10|#11|#12|#13|#14|#15|#16|#17|#18|#19|#20}&#8217;);</p>
<p>$speak = spin(&#8216;{interesting|awesome|amazing|cool|informative|wierd|dope|wicked|neat|swell|inspiring|audacious|fullfilling|kickass|super cool} {site|page|article|link|file|place|zone|method|failure|success story|tactic}&#8217;);</p>
<p>What I need to do is call the results of the $spin2 function (ie: #1, #2 etc) and the results of $speak (ie: interesting failure etc&#8230;) into a new function using the same spin code:</p>
<p>$awesome = $spin(&#8216;{$spin2|$speak}&#8217;);</p>
<p>so that $awesome will return either &#8220;#1&#8243; OR &#8220;awesome method&#8221; etc&#8230;</p>
<p>Right now, using the code above, I get a result returned of the actual function</p>
<p>ie: the echo is &#8220;$spin2&#8243; or &#8220;$speak&#8221; instead of the results OF the function.</p>
<p>Hopefully this makes sense, and hopefully someone can give me some useful code here.</p>
<p>Thanks ahead of time!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Simple Seo</title>
		<link>http://www.madimmarketing.com/internet-marketing/php-text-spinner/comment-page-1/#comment-11334</link>
		<dc:creator>Simple Seo</dc:creator>
		<pubDate>Thu, 04 Mar 2010 22:07:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.madimmarketing.com/?p=1000#comment-11334</guid>
		<description>Wow, that is very clean.
Shortest spin code I have ever seen by far.

Thanks!</description>
		<content:encoded><![CDATA[<p>Wow, that is very clean.<br />
Shortest spin code I have ever seen by far.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lee</title>
		<link>http://www.madimmarketing.com/internet-marketing/php-text-spinner/comment-page-1/#comment-10314</link>
		<dc:creator>Lee</dc:creator>
		<pubDate>Tue, 09 Feb 2010 01:30:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.madimmarketing.com/?p=1000#comment-10314</guid>
		<description>I&#039;m going to try it and see. Thanks so much for sharing it with your readers.</description>
		<content:encoded><![CDATA[<p>I&#8217;m going to try it and see. Thanks so much for sharing it with your readers.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
