Preg replace digits inside string

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lovelf
Forum Contributor
Posts: 153
Joined: Wed Nov 05, 2008 12:06 am

Preg replace digits inside string

Post by lovelf »

Code: Select all

 
$foo=str_replace("Content-Length: 1234567890","",$foo);
 
1234567890 vary .... just a line that would erase those numbers sent right after content-length: .

Thanks world
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Preg replace digits inside string

Post by requinix »

Code: Select all

$foo = substr($foo, 0, 16);
Post Reply