<?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 Function: remove special characters from post data</title>
	<atom:link href="http://anthonydamasco.net/blog/php-function-remove-special-characters-from-post-data/feed/" rel="self" type="application/rss+xml" />
	<link>http://anthonydamasco.net/blog/php-function-remove-special-characters-from-post-data/</link>
	<description>Web Development Portfolio and Blog</description>
	<lastBuildDate>Thu, 17 May 2012 21:26:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: jiiiik.com</title>
		<link>http://anthonydamasco.net/blog/php-function-remove-special-characters-from-post-data/comment-page-1/#comment-77615</link>
		<dc:creator>jiiiik.com</dc:creator>
		<pubDate>Sat, 12 May 2012 09:45:18 +0000</pubDate>
		<guid isPermaLink="false">http://anthonydamasco.net/blog/?p=75#comment-77615</guid>
		<description>PHP Function: remove special characters from post data &#124; AnthonyDamasco.net Pretty nice post. I just stumbled upon your blog and wanted to say that I&#039;ve truly enjoyed surfing around your blog posts. In any case I will be subscribing to your rss feed and I hope you write again very soon!</description>
		<content:encoded><![CDATA[<p>PHP Function: remove special characters from post data | AnthonyDamasco.net Pretty nice post. I just stumbled upon your blog and wanted to say that I&#8217;ve truly enjoyed surfing around your blog posts. In any case I will be subscribing to your rss feed and I hope you write again very soon!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tolinakopa</title>
		<link>http://anthonydamasco.net/blog/php-function-remove-special-characters-from-post-data/comment-page-1/#comment-75530</link>
		<dc:creator>tolinakopa</dc:creator>
		<pubDate>Fri, 20 Apr 2012 19:18:14 +0000</pubDate>
		<guid isPermaLink="false">http://anthonydamasco.net/blog/?p=75#comment-75530</guid>
		<description>Seeking today rothmans will above galaxy and all making    
   
&lt;a href=&quot;http://kilolla.webs.com/&quot; / rel=&quot;nofollow&quot;&gt;rothmans cigarettes,12&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Seeking today rothmans will above galaxy and all making    </p>
<p><a href="http://kilolla.webs.com/" / rel="nofollow">rothmans cigarettes,12</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Luis Garso</title>
		<link>http://anthonydamasco.net/blog/php-function-remove-special-characters-from-post-data/comment-page-1/#comment-67826</link>
		<dc:creator>Luis Garso</dc:creator>
		<pubDate>Wed, 25 Jan 2012 09:35:55 +0000</pubDate>
		<guid isPermaLink="false">http://anthonydamasco.net/blog/?p=75#comment-67826</guid>
		<description>Use htmlentities()
Example:

$value = htmlentities($_POST [&#039;stringposted&#039;]);

Very easy my friends...</description>
		<content:encoded><![CDATA[<p>Use htmlentities()<br />
Example:</p>
<p>$value = htmlentities($_POST ['stringposted']);</p>
<p>Very easy my friends&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WojciechM</title>
		<link>http://anthonydamasco.net/blog/php-function-remove-special-characters-from-post-data/comment-page-1/#comment-64394</link>
		<dc:creator>WojciechM</dc:creator>
		<pubDate>Tue, 06 Dec 2011 15:09:32 +0000</pubDate>
		<guid isPermaLink="false">http://anthonydamasco.net/blog/?p=75#comment-64394</guid>
		<description>Seeing as how nobody answered the array with questions properly till now I decided to reply. I know it&#039;s been a long time since the original post, but I see people are still stumbling into it.

All this is actually information is easily obtainable from the manual http://php.net/manual/en/function.str-replace.php


$digits = array(&quot;1&quot;, &quot;2&quot;, &quot;3&quot;);
$digitsAsWords   = array(&quot;one&quot;, &quot;two&quot;, &quot;three&quot;);
$phrase  = &quot;It&#039;s easy as 1, 2, 3.&quot;;

$newphrase = str_replace($digits, $digitsAsWords, $phrase);
// Provides: &quot;It&#039;s easy as one, two, three.&quot;;</description>
		<content:encoded><![CDATA[<p>Seeing as how nobody answered the array with questions properly till now I decided to reply. I know it&#8217;s been a long time since the original post, but I see people are still stumbling into it.</p>
<p>All this is actually information is easily obtainable from the manual <a href="http://php.net/manual/en/function.str-replace.php" rel="nofollow">http://php.net/manual/en/function.str-replace.php</a></p>
<p>$digits = array(&#8220;1&#8243;, &#8220;2&#8243;, &#8220;3&#8243;);<br />
$digitsAsWords   = array(&#8220;one&#8221;, &#8220;two&#8221;, &#8220;three&#8221;);<br />
$phrase  = &#8220;It&#8217;s easy as 1, 2, 3.&#8221;;</p>
<p>$newphrase = str_replace($digits, $digitsAsWords, $phrase);<br />
// Provides: &#8220;It&#8217;s easy as one, two, three.&#8221;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aas</title>
		<link>http://anthonydamasco.net/blog/php-function-remove-special-characters-from-post-data/comment-page-1/#comment-45628</link>
		<dc:creator>aas</dc:creator>
		<pubDate>Thu, 14 Jul 2011 06:17:16 +0000</pubDate>
		<guid isPermaLink="false">http://anthonydamasco.net/blog/?p=75#comment-45628</guid>
		<description>cool</description>
		<content:encoded><![CDATA[<p>cool</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jimmy</title>
		<link>http://anthonydamasco.net/blog/php-function-remove-special-characters-from-post-data/comment-page-1/#comment-10925</link>
		<dc:creator>Jimmy</dc:creator>
		<pubDate>Mon, 20 Dec 2010 22:02:43 +0000</pubDate>
		<guid isPermaLink="false">http://anthonydamasco.net/blog/?p=75#comment-10925</guid>
		<description>Could anyone tell me the code for - I can&#039;t get it to display the character for replacement on any machine I own. It always shows up as a ?</description>
		<content:encoded><![CDATA[<p>Could anyone tell me the code for &#8211; I can&#8217;t get it to display the character for replacement on any machine I own. It always shows up as a ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juan Pablo Rodriguez</title>
		<link>http://anthonydamasco.net/blog/php-function-remove-special-characters-from-post-data/comment-page-1/#comment-655</link>
		<dc:creator>Juan Pablo Rodriguez</dc:creator>
		<pubDate>Mon, 13 Sep 2010 00:59:45 +0000</pubDate>
		<guid isPermaLink="false">http://anthonydamasco.net/blog/?p=75#comment-655</guid>
		<description>Thank you this was most useful! Here&#039;s what I think WeaponsTheyFear meant:

$array_of_special_chars=array(&quot;ñ&quot;,&quot;Á&quot;,&quot;á&quot;,&quot;É&quot;); //you must put all the array elements, here&#039;s only the first 4
$array_of_equivalents=array(&quot;&#241;&quot;,&quot;&#193;&quot;,&quot;&#225;&quot;,&quot;&#201;&quot;); //same as above
//The order is very important, also both arrays must be the same size
for ($i=0;$i&lt;sizeof($array_of_special_chars);$i++) $string=str_replace($array_of_special_chars[$i],$array_of_equivalents[$i],$string);</description>
		<content:encoded><![CDATA[<p>Thank you this was most useful! Here&#8217;s what I think WeaponsTheyFear meant:</p>
<p>$array_of_special_chars=array(&#8220;ñ&#8221;,&#8221;Á&#8221;,&#8221;á&#8221;,&#8221;É&#8221;); //you must put all the array elements, here&#8217;s only the first 4<br />
$array_of_equivalents=array(&#8220;&#241;&#8221;,&#8221;&#193;&#8221;,&#8221;&#225;&#8221;,&#8221;&#201;&#8221;); //same as above<br />
//The order is very important, also both arrays must be the same size<br />
for ($i=0;$i&lt;sizeof($array_of_special_chars);$i++) $string=str_replace($array_of_special_chars[$i],$array_of_equivalents[$i],$string);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dewey Dufrain</title>
		<link>http://anthonydamasco.net/blog/php-function-remove-special-characters-from-post-data/comment-page-1/#comment-24</link>
		<dc:creator>Dewey Dufrain</dc:creator>
		<pubDate>Thu, 08 Apr 2010 01:23:17 +0000</pubDate>
		<guid isPermaLink="false">http://anthonydamasco.net/blog/?p=75#comment-24</guid>
		<description>I’ve been reading through your site. You have some awesome posts on here, especially this one - I really liked it…nice post. Consider yourself bookmarked</description>
		<content:encoded><![CDATA[<p>I’ve been reading through your site. You have some awesome posts on here, especially this one &#8211; I really liked it…nice post. Consider yourself bookmarked</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anthony Damasco</title>
		<link>http://anthonydamasco.net/blog/php-function-remove-special-characters-from-post-data/comment-page-1/#comment-13</link>
		<dc:creator>Anthony Damasco</dc:creator>
		<pubDate>Mon, 05 Apr 2010 12:18:33 +0000</pubDate>
		<guid isPermaLink="false">http://anthonydamasco.net/blog/?p=75#comment-13</guid>
		<description>Want to post an example for any readers browsing my blog?</description>
		<content:encoded><![CDATA[<p>Want to post an example for any readers browsing my blog?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WeaponsTheyFear</title>
		<link>http://anthonydamasco.net/blog/php-function-remove-special-characters-from-post-data/comment-page-1/#comment-7</link>
		<dc:creator>WeaponsTheyFear</dc:creator>
		<pubDate>Tue, 30 Mar 2010 22:12:10 +0000</pubDate>
		<guid isPermaLink="false">http://anthonydamasco.net/blog/?p=75#comment-7</guid>
		<description>Rather than calling so many str_replace functions, you could put the characters to replace in an array and the chars to replace with in an array and run one call to str_replace to do this.</description>
		<content:encoded><![CDATA[<p>Rather than calling so many str_replace functions, you could put the characters to replace in an array and the chars to replace with in an array and run one call to str_replace to do this.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

