I need to append a text at the end position of the search term.
$baseStr = 'www.abc.com/cdf/?x=10';
$searchStr = 'www.abc.com/';
$insertStr = 'xxx/';
I need to insert $insertStr after 'www.abc.com/' in $baseStr. I get only the start position using strpos.
Expected result:
$resultStr = 'www.abc.com/xxx/cdf/?x=10';
Edit: Is it possible to find the end position of the search string and solve this?
$baseStris fixed? I mean "www.abc.com"?