<?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"
	>
<channel>
	<title>Comments on: Use PHP to strip the last character in a string</title>
	<atom:link href="http://www.christopherjason.com/articles/php-strip-characters/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.christopherjason.com/articles/php-strip-characters/</link>
	<description>web development, web design, technical communication information for novices and experts</description>
	<pubDate>Sat, 05 Jul 2008 10:29:31 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: Christopher Jason</title>
		<link>http://www.christopherjason.com/articles/php-strip-characters/#comment-22305</link>
		<dc:creator>Christopher Jason</dc:creator>
		<pubDate>Thu, 21 Jun 2007 01:25:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.christopherjason.com/articles/36/#comment-22305</guid>
		<description>pRojex-

Do you have a URL we could look at? I (or another user) might be able to help.

- Chris</description>
		<content:encoded><![CDATA[<p>pRojex-</p>
<p>Do you have a URL we could look at? I (or another user) might be able to help.</p>
<p>- Chris</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pRojex</title>
		<link>http://www.christopherjason.com/articles/php-strip-characters/#comment-22289</link>
		<dc:creator>pRojex</dc:creator>
		<pubDate>Thu, 21 Jun 2007 00:08:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.christopherjason.com/articles/36/#comment-22289</guid>
		<description>I am trying to make the html input page take an amount that has commas and remove them and still spit out the correct amount. it only works if I leave out the commas. this is my code and I added your code to mine and I dont see a change in the results. 

</description>
		<content:encoded><![CDATA[<p>I am trying to make the html input page take an amount that has commas and remove them and still spit out the correct amount. it only works if I leave out the commas. this is my code and I added your code to mine and I dont see a change in the results.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://www.christopherjason.com/articles/php-strip-characters/#comment-11985</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Tue, 10 Apr 2007 17:20:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.christopherjason.com/articles/36/#comment-11985</guid>
		<description>How would I go about checking the last 4 characters of a string?  For example, if I wanted to change this string "hello!!!!" to be "hello", only when there are 4 exclamations.</description>
		<content:encoded><![CDATA[<p>How would I go about checking the last 4 characters of a string?  For example, if I wanted to change this string &#8220;hello!!!!&#8221; to be &#8220;hello&#8221;, only when there are 4 exclamations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://www.christopherjason.com/articles/php-strip-characters/#comment-11541</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Thu, 05 Apr 2007 14:34:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.christopherjason.com/articles/36/#comment-11541</guid>
		<description>$outgoing = substr_replace($incoming,"",-1);</description>
		<content:encoded><![CDATA[<p>$outgoing = substr_replace($incoming,&#8221;",-1);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Don</title>
		<link>http://www.christopherjason.com/articles/php-strip-characters/#comment-10315</link>
		<dc:creator>Don</dc:creator>
		<pubDate>Tue, 20 Mar 2007 19:24:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.christopherjason.com/articles/36/#comment-10315</guid>
		<description>Zaur: 

The trim() function removes leading and trailing whitespaces of a string.</description>
		<content:encoded><![CDATA[<p>Zaur: </p>
<p>The trim() function removes leading and trailing whitespaces of a string.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DM</title>
		<link>http://www.christopherjason.com/articles/php-strip-characters/#comment-10309</link>
		<dc:creator>DM</dc:creator>
		<pubDate>Tue, 20 Mar 2007 18:30:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.christopherjason.com/articles/36/#comment-10309</guid>
		<description>Zaur,
You can check the last character in the string, as in the code below:

$st = "abcde ";
$len = strlen($st);
st[$len-1] == ' ' ? return false : return true;</description>
		<content:encoded><![CDATA[<p>Zaur,<br />
You can check the last character in the string, as in the code below:</p>
<p>$st = &#8220;abcde &#8220;;<br />
$len = strlen($st);<br />
st[$len-1] == &#8216; &#8216; ? return false : return true;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zaur</title>
		<link>http://www.christopherjason.com/articles/php-strip-characters/#comment-9047</link>
		<dc:creator>Zaur</dc:creator>
		<pubDate>Thu, 08 Mar 2007 20:14:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.christopherjason.com/articles/36/#comment-9047</guid>
		<description>Hi nice example, but I'm looking for the best way to find whether the sting include space at the end, if yes then return to false, no need to delete. Is there any way except regular expression?</description>
		<content:encoded><![CDATA[<p>Hi nice example, but I&#8217;m looking for the best way to find whether the sting include space at the end, if yes then return to false, no need to delete. Is there any way except regular expression?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Shiflett</title>
		<link>http://www.christopherjason.com/articles/php-strip-characters/#comment-125</link>
		<dc:creator>Chris Shiflett</dc:creator>
		<pubDate>Mon, 01 May 2006 18:04:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.christopherjason.com/articles/36/#comment-125</guid>
		<description>You can also avoid the problem entirely by using implode(), so you don't have the superfluous delimiters in the first place. :-)</description>
		<content:encoded><![CDATA[<p>You can also avoid the problem entirely by using implode(), so you don&#8217;t have the superfluous delimiters in the first place. :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tiffany</title>
		<link>http://www.christopherjason.com/articles/php-strip-characters/#comment-124</link>
		<dc:creator>tiffany</dc:creator>
		<pubDate>Sun, 30 Apr 2006 16:44:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.christopherjason.com/articles/36/#comment-124</guid>
		<description>You can also use &lt;a href="http://us3.php.net/rtrim" rel="nofollow"&gt;rtrim()&lt;/a&gt;. 

The second, optional parameter of rtrim() is a character list. To use your example: 

$string = "ASP, ASP Programming, CSS, Information Technology, JavaScript Programming, ";

$newstring=rtrim($string,', '); 

Printing or echo-ing $newstring would give you the same result.

</description>
		<content:encoded><![CDATA[<p>You can also use <a href="http://us3.php.net/rtrim" rel="nofollow">rtrim()</a>. </p>
<p>The second, optional parameter of rtrim() is a character list. To use your example: </p>
<p>$string = &#8220;ASP, ASP Programming, CSS, Information Technology, JavaScript Programming, &#8220;;</p>
<p>$newstring=rtrim($string,&#8217;, &#8216;); </p>
<p>Printing or echo-ing $newstring would give you the same result.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
