Re: [PHP4BETA] (fwd) Re: [PHP4BETA] replacing a substring
| From: | Rasmus Lerdorf | Date: | Thu, 01 Jan 1970 00:00:00 +0000 |
| Subject: | Re: [PHP4BETA] (fwd) Re: [PHP4BETA] replacing a substring | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-6321@lists.php.net to get a copy of this message | ||
> There are 2 ways to go about it.
>
> 1) Add 4th argument to substr() which would replace the text delimited
> by offset and length.
> 2) Create a new function that does this.
>
> Opinions?
I say make a new function and call it cut() and mimic the behaviour of the
Unix cut command. substr() is not an intuitive place for string
replacement.
-Rasmus