Faqts

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 11 people (45%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

How can i remove a part of a String

Apr 21st, 2009 17:01
forum net tr, osama said, i can do it, Nick R, Babu B,


//if the string is say
$my_string="this is my string";
//remove "my" from $my_string
$my_new_string=str_replace("my", "", $my_string);
// replace "my", with ""(blank_space), in $my_string
//the first set of quotes "my" will be whatever you want to replace
//the second set of quotes "" will be whatever you want to remove
//and $my_string will be the string that your editing
http://www.forumnettr.com/
http://www.forumnettr.com/forum/
http://www.firmanettr.com/
http://www.videotrtube.com/