<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
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/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>php wordpress - WP2X</title> <atom:link href="https://wp2x.com/tag/php-wordpress/feed/" rel="self" type="application/rss+xml" /><link>https://wp2x.com</link> <description>We can help your Wordpress faster</description> <lastBuildDate>Sun, 19 Apr 2015 12:53:56 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod> hourly </sy:updatePeriod> <sy:updateFrequency> 1 </sy:updateFrequency> <generator>https://wordpress.org/?v=5.6.17</generator> <item><title>Get last character from string in PHP</title><link>https://wp2x.com/get-last-character-from-string-in-php/</link> <dc:creator><![CDATA[david]]></dc:creator> <pubDate>Sun, 19 Apr 2015 12:53:56 +0000</pubDate> <category><![CDATA[Wordpress Tips]]></category> <category><![CDATA[php programming]]></category> <category><![CDATA[php string]]></category> <category><![CDATA[php tips]]></category> <category><![CDATA[php wordpress]]></category> <category><![CDATA[wordpress tips]]></category> <category><![CDATA[wordpress tutorial]]></category> <guid
isPermaLink="false">http://wp2x.com/?p=361</guid><description><![CDATA[<p>Easy but not for all of us to get last character from string in PHP. It &#8216;s quite simple to figure out with a quick Google it. So if you found my article about this. Then you are in right place to solve this issuse with a simplest way. 1. Get the last char of a ...</p><p>The post <a
rel="nofollow" href="https://wp2x.com/get-last-character-from-string-in-php/">Get last character from string in PHP</a> appeared first on <a
rel="nofollow" href="https://wp2x.com">WP2X</a>.</p> ]]></description> <content:encoded><![CDATA[<p>Easy but not for all of us to get last character from string in PHP. It &#8216;s quite simple to figure out with a quick Google it. So if you found my article about this. Then you are in right place to solve this issuse with a simplest way.<span
id="more-361"></span></p><h2><a
href="http://wp2x.com/wp-content/uploads/2015/04/php-string.jpeg?4b2a2c&amp;4b2a2c"><img
loading="lazy" class="aligncenter size-full wp-image-362" src="http://wp2x.com/wp-content/uploads/2015/04/php-string.jpeg?4b2a2c&amp;4b2a2c" alt="php string" width="259" height="194" /></a></h2><h2>1. Get the last char of a string in PHP</h2><p>If you want to get the only one character in a string, here is simplest function to do.</p><pre class="lang:php decode:true">substr("testers", -1); // returns "s"</pre><p>So simple?</p><p>And what if you want 2 characters? Let &#8216;s do this</p><pre class="lang:default decode:true ">substr("testers", -2); // returns "rs"</pre><h2> 2. Remove the last character from string</h2><p>Just a bonus if this article, if you want to remove the last character in a string. You can do this function</p><pre class="lang:php decode:true ">substr("a,b,c,d,e,", 0, -1);</pre><p>The output is a,b,c,d,e</p><p>Hope this article help you solve the problem with string.</p><p>Thanks</p><p>The post <a
rel="nofollow" href="https://wp2x.com/get-last-character-from-string-in-php/">Get last character from string in PHP</a> appeared first on <a
rel="nofollow" href="https://wp2x.com">WP2X</a>.</p> ]]></content:encoded> </item> </channel> </rss>