Re: Pattern Replacing
| From: | Sterling | Date: | Thu, 29 Mar 2001 20:53:06 +0000 |
| Subject: | Re: Pattern Replacing | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-46153@lists.php.net to get a copy of this message | ||
H-
Thanks for the emails and reply.
Someone mentioned substr and after first failing with the attempt I went
to the PHP site and looked it up.
Here's code that works for what I'm trying to do.
$test = "tree, bird, nest, ";
$new = substr($test, 0, strlen($test)-2);
$new = "$new ";
Appreciate nudges in the right directions.
-Sterling