I am working with php. I have some dynamic string. Now I want to add some number after some string. Like, I have a string this is me (1). Now I want to add -7 after 1. So that string should be print like this this is me (1-7).
I have done this properly by using substr_replace. like this
substr_replace('this is me (1)','-59',-1,-1)
Now if there is more than one number like this this is me(2,3,1). I want to add -7 after each number. like this one this is me(2-7,3-7,1-7).
Please help. TIA