Re: remove from a string
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: remove from a string

From: Will Woodhull <will@thornhenge.org>
Date: Fri Aug 26 2005 - 03:34:39 CEST

werdna.sivad@gmail.com wrote:
> Is there a function in PHP that will remove a blob from inside a
> string. Similar to the substr() function, but instead of giving me the
> string I want it to remove the string.
>
> For example, I have the string "john goes running" I want to be able
> to tell it to remove 5 characters starting at position 4, which would
> get me "john running"

Check out str_replace()
http://us3.php.net/manual/en/function.str-replace.php
Received on Mon Oct 24 02:09:34 2005