[Solved] I am anable to replace comment- in php [duplicate]


$string = str_replace(“comment-“, “”, “comment-454”);

should replace what you want.

you mentioned comment-454 came from your database. So ill assume it’s in $result.

Now you can do:

$string = str_replace("comment-", "", $result);

echo $string;

2

solved I am anable to replace comment- in php [duplicate]