Stripping characters
I currently use a string such as the one below to strip the last character in my string ... however I'm now getting to a point where some of the $x variables will not have a period at the end, that I want to strip.
$x_str = substr($x, 0, -1);
How can I go about selectively removing the last character, based upon what it is?
Thanks in advance!
Veselin
2008-04-23 09:00:04
Re:
you can check the last character in the string using: