Removing SubString from a 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
varma457
Forum Newbie
Posts: 23
Joined: Sat Jul 11, 2009 2:43 pm

Removing SubString from a string

Post by varma457 »

Hi,



I have problem with String operation..

I would like to remove substring from a given string..
like..


/$string="Hi how hi hhii ";
//$string1="Hi how";
//$newstring=ltrim($string,$string1);


I am not able to remove "Hi how" ..

I am able to remove "Hi"..

help me rgarding this problem..
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: Removing SubString from a string

Post by jackpf »

You mean str_replace()?
varma457
Forum Newbie
Posts: 23
Joined: Sat Jul 11, 2009 2:43 pm

Re: Removing SubString from a string

Post by varma457 »

Thank you..I got it..
Post Reply