How to raplce in the string blaahahahaha Rateds blablah;blahblah
I need to replace "Rateds blablah;" to empty space blablah is dynamic value.
str_replace won't do it.
How to do this?
you need to give more info
how will you know what to replace and what not?
you can look at preg_replace() but you may not need it. theres also substr() and its related functions
"Rated blablah;"
I want to replace pattern that has "Rated any characters and;"
Start from "Rated up to first semicolon.
It doesn't replace "Rated 4 by 5;"
$replacement =""; $pattern = "/Rated.+;/"; $found_str = preg_replace($pattern, $replacement, $found_str);