Hi I want to add some characters at a given spot within a string.
Lets say my string is:
$image="images/fruit.jpg";
And I want to add: -2 just before the dot, so it becomes:
$image="images/fruit-2.jpg";
Which command or line do I need for this?
Thanks
Lets say my string is:
$image="images/fruit.jpg";
And I want to add: -2 just before the dot, so it becomes:
$image="images/fruit-2.jpg";
Which command or line do I need for this?
Thanks
Comment