Re: removing chars from string
| From: | Richard Davey | Date: | Mon, 27 Jun 2005 15:47:09 +0000 |
| Subject: | Re: removing chars from string | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-217693@lists.php.net to get a copy of this message | ||
Hello Paul,
Monday, June 27, 2005, 4:33:35 PM, you wrote:
PN> If a have a string thats 11 characters long how can I strip off
PN> the last two characters?
$newstring = substr($string, 0, -2);
Best regards,
Richard Davey
--
http://www.launchcode.co.uk - PHP Development Services
"I do not fear computers. I fear the lack of them." - Isaac Asimov