Re: character replace function
| From: | Andrey Hristov | Date: | Thu, 14 Feb 2002 18:53:26 +0000 |
| Subject: | Re: character replace function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-84783@lists.php.net to get a copy of this message | ||
you want to remove a char at position $x.
so
$the_string = substr($the_string,0,$x).substr($the_string,$x+1,strlen($the_string)-1-$x);
you can do some juggling in the second substr() with negative values for the parameters but they
will not be more fast than this.
Best regards,
Andrey Hristov
----- Original Message -----
From: "Phil Schwarzmann" <pschwar@jhmi.edu>
To: <php-general@lists.php.net>
Sent: Thursday, February 14, 2002 8:38 PM
Subject: [PHP] character replace function
> I need a function that will erase a particular character in a string.
>
> Any ideas?!?
>
>
> THANKS!!!!
>