<?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: UPDATED: Strip Off Characters from String Using PHP (substr)</title>
	<atom:link href="http://www.linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/</link>
	<description></description>
	<lastBuildDate>Tue, 02 Mar 2010 12:44:59 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: RedMatrix</title>
		<link>http://www.linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/comment-page-1/#comment-3726</link>
		<dc:creator>RedMatrix</dc:creator>
		<pubDate>Wed, 03 Jun 2009 04:27:42 +0000</pubDate>
		<guid isPermaLink="false">http://linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/#comment-3726</guid>
		<description>No, I didn&#039;t have a question.  I tried to mean than you answered my question.  Thanks.</description>
		<content:encoded><![CDATA[<p>No, I didn&#8217;t have a question.  I tried to mean than you answered my question.  Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john</title>
		<link>http://www.linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/comment-page-1/#comment-3725</link>
		<dc:creator>john</dc:creator>
		<pubDate>Tue, 02 Jun 2009 22:27:38 +0000</pubDate>
		<guid isPermaLink="false">http://linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/#comment-3725</guid>
		<description>I&#039;m not 100% sure what you&#039;re looking for so please use the contact form [http://www.linein.org/blog/contact/] and shoot me a message with a little more information on what you&#039;re trying to do.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not 100% sure what you&#8217;re looking for so please use the contact form [http://www.linein.org/blog/contact/] and shoot me a message with a little more information on what you&#8217;re trying to do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RedMatrix</title>
		<link>http://www.linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/comment-page-1/#comment-3722</link>
		<dc:creator>RedMatrix</dc:creator>
		<pubDate>Tue, 02 Jun 2009 14:45:04 +0000</pubDate>
		<guid isPermaLink="false">http://linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/#comment-3722</guid>
		<description>Thanks for the easy code.  I was wondering how to do it to read a file that has headings that start with a colon, and then use the heading in an &lt;h2&gt;, but everything else in a &lt;li&gt;.

I am building a list of products for an ebay script, but wanted it to be in categories to make it easier on the visitor.  RE site: &lt;a href=&quot;http://buywiifitplus.com&quot; title=&quot;Buy Wii Fit from ebay&quot; rel=&quot;nofollow&quot;&gt;BuyWiiFitPlus.com&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Thanks for the easy code.  I was wondering how to do it to read a file that has headings that start with a colon, and then use the heading in an &lt;h2&gt;, but everything else in a &lt;li&gt;.</p>
<p>I am building a list of products for an ebay script, but wanted it to be in categories to make it easier on the visitor.  RE site: <a href="http://buywiifitplus.com" title="Buy Wii Fit from ebay" rel="nofollow">BuyWiiFitPlus.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: amscray</title>
		<link>http://www.linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/comment-page-1/#comment-2950</link>
		<dc:creator>amscray</dc:creator>
		<pubDate>Tue, 10 Mar 2009 17:08:08 +0000</pubDate>
		<guid isPermaLink="false">http://linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/#comment-2950</guid>
		<description>Thanks a lot for writing this article. I found it to be a very useful reference.</description>
		<content:encoded><![CDATA[<p>Thanks a lot for writing this article. I found it to be a very useful reference.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/comment-page-1/#comment-2873</link>
		<dc:creator>John</dc:creator>
		<pubDate>Tue, 17 Feb 2009 19:30:53 +0000</pubDate>
		<guid isPermaLink="false">http://linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/#comment-2873</guid>
		<description>Great tutorial.  Worked perfect first time.  Thank you for making it simple!</description>
		<content:encoded><![CDATA[<p>Great tutorial.  Worked perfect first time.  Thank you for making it simple!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john</title>
		<link>http://www.linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/comment-page-1/#comment-2229</link>
		<dc:creator>john</dc:creator>
		<pubDate>Mon, 29 Sep 2008 16:20:48 +0000</pubDate>
		<guid isPermaLink="false">http://linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/#comment-2229</guid>
		<description>Yes, there is an easy way to do this. You&#039;ll want to use explode() to split apart the text where the : is.

$text = &#039;Living: news&#039;;
$text_bits = explode(&#039;:&#039;,$text);

now you have an array that looks like this
array(0 =&gt; &#039;Living&#039;, 1 =&gt; &#039;news&#039;);

Then to display it:
echo $text_bits[1]; // would display just &quot;news&quot;

Basically what you&#039;re doing is spiting the text at the : into two parts and then echoing the part you want.</description>
		<content:encoded><![CDATA[<p>Yes, there is an easy way to do this. You&#8217;ll want to use explode() to split apart the text where the : is.</p>
<p>$text = &#8216;Living: news&#8217;;<br />
$text_bits = explode(&#8216;:&#8217;,$text);</p>
<p>now you have an array that looks like this<br />
array(0 => &#8216;Living&#8217;, 1 => &#8216;news&#8217;);</p>
<p>Then to display it:<br />
echo $text_bits[1]; // would display just &#8220;news&#8221;</p>
<p>Basically what you&#8217;re doing is spiting the text at the : into two parts and then echoing the part you want.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roger Coathup</title>
		<link>http://www.linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/comment-page-1/#comment-2228</link>
		<dc:creator>Roger Coathup</dc:creator>
		<pubDate>Mon, 29 Sep 2008 15:24:23 +0000</pubDate>
		<guid isPermaLink="false">http://linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/#comment-2228</guid>
		<description>I have a series of strings, e.g. 

Living: news
Beauty: news
Fashions: features

and want to strip off all the text up to and including the &#039;:&#039;.

Is there any easy way to do this?</description>
		<content:encoded><![CDATA[<p>I have a series of strings, e.g. </p>
<p>Living: news<br />
Beauty: news<br />
Fashions: features</p>
<p>and want to strip off all the text up to and including the &#8216;:&#8217;.</p>
<p>Is there any easy way to do this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john</title>
		<link>http://www.linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/comment-page-1/#comment-2211</link>
		<dc:creator>john</dc:creator>
		<pubDate>Fri, 19 Sep 2008 13:18:16 +0000</pubDate>
		<guid isPermaLink="false">http://linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/#comment-2211</guid>
		<description>If you&#039;re just trying to drop off the decimal points, then you should use ceil() (http://us3.php.net/ceil).

Otherwise you could use, &lt;b&gt;substr($all[SquareMeters],0,-3);&lt;/b&gt; to drop off the decimal and the two numbers after it. But again ceil() would be better in case your number ever had three decimal places.</description>
		<content:encoded><![CDATA[<p>If you&#8217;re just trying to drop off the decimal points, then you should use ceil() (<a href="http://us3.php.net/ceil" rel="nofollow">http://us3.php.net/ceil</a>).</p>
<p>Otherwise you could use, <b>substr($all[SquareMeters],0,-3);</b> to drop off the decimal and the two numbers after it. But again ceil() would be better in case your number ever had three decimal places.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan Williams</title>
		<link>http://www.linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/comment-page-1/#comment-2210</link>
		<dc:creator>Alan Williams</dc:creator>
		<pubDate>Fri, 19 Sep 2008 09:32:28 +0000</pubDate>
		<guid isPermaLink="false">http://linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/#comment-2210</guid>
		<description>Hi
I am trying to get the following to not display the last 3 characters which are a decimall point an 2 zeros. However as it is in the middle of HTML whatever I try seems not to work. The full code is below and the excerpt (I have isolated it in the bulk code below for ease) I want to shorten is this: $al[SquareMeters] Square Metres - any suggestions?

	$ShowInfo = &quot;\n\t\n\t&lt;b&gt;Location:&lt;/b&gt; $a1[country]\n\t&lt;B&gt;Price: $aset[Currencya]$MyPriceClick any image to enlarge\n\n\n\n\t&lt;b&gt;Property ID:&lt;/b&gt; $a1[ListingID]&lt;b&gt;Property Overview:&lt;/b&gt;$a1[rooms] Bedroom(s)$a1[bathrooms] Bathroom(s)$a1[garage] Car Garage&lt;b&gt;Build Size:&lt;/b&gt;
 
$al[SquareMeters] Square Metres

&lt;b&gt;Plot Size:&lt;/b&gt; $a1[LotSize] Square Metres&lt;b&gt;Age of Property:&lt;/b&gt; $a1[HomeAge] years&lt;b&gt;Detailed Description&lt;/b&gt;$desc&lt;b&gt;More Details:&lt;/b&gt;&quot;;</description>
		<content:encoded><![CDATA[<p>Hi<br />
I am trying to get the following to not display the last 3 characters which are a decimall point an 2 zeros. However as it is in the middle of HTML whatever I try seems not to work. The full code is below and the excerpt (I have isolated it in the bulk code below for ease) I want to shorten is this: $al[SquareMeters] Square Metres &#8211; any suggestions?</p>
<p>	$ShowInfo = &#8220;\n\t\n\t<b>Location:</b> $a1[country]\n\t<b>Price: $aset[Currencya]$MyPriceClick any image to enlarge\n\n\n\n\t</b><b>Property ID:</b> $a1[ListingID]<b>Property Overview:</b>$a1[rooms] Bedroom(s)$a1[bathrooms] Bathroom(s)$a1[garage] Car Garage<b>Build Size:</b></p>
<p>$al[SquareMeters] Square Metres</p>
<p><b>Plot Size:</b> $a1[LotSize] Square Metres<b>Age of Property:</b> $a1[HomeAge] years<b>Detailed Description</b>$desc<b>More Details:</b>&#8220;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: john</title>
		<link>http://www.linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/comment-page-1/#comment-2090</link>
		<dc:creator>john</dc:creator>
		<pubDate>Sun, 06 Jul 2008 12:54:37 +0000</pubDate>
		<guid isPermaLink="false">http://linein.org/blog/2008/02/15/updated-strip-off-characters-from-string-using-php-substr/#comment-2090</guid>
		<description>In that case you would want to use &lt;code&gt;str_replace&lt;/code&gt;.

For example:
$text = &#039;Children Of Men (R)&#039;;
$goal = str_replace(&#039;(R)&#039;,&#039;&#039;,$text);

This will replace the &#039;(R)&#039; with nothing (&#039;&#039;).

Just let me know if you have any questions about this.</description>
		<content:encoded><![CDATA[<p>In that case you would want to use <code>str_replace</code>.</p>
<p>For example:<br />
$text = &#8216;Children Of Men (R)&#8217;;<br />
$goal = str_replace(&#8216;(R)&#8217;,&#8221;,$text);</p>
<p>This will replace the &#8216;(R)&#8217; with nothing (&#8221;).</p>
<p>Just let me know if you have any questions about this.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
