[Solved] Add a text in a string PHP

[ad_1]

You can explode by the slash by one way.

$exploded_text = explode("https://stackoverflow.com/", $text);
$new_text = $exploded_text[0] . $exploded_text[1] . 'p' . $exploded_text[2];

It’s not the best way, but it will work.

4

[ad_2]

solved Add a text in a string PHP