There is a string of type 1ef75b369804f887a0f1a3efa39f0d12.jpg . How to insert the word _thumb into the 32 position that would 1ef75b369804f887a0f1a3efa39f0d12_thumb.jpg out 1ef75b369804f887a0f1a3efa39f0d12_thumb.jpg in php

    1 answer 1

     $oldStr = "1ef75b369804f887a0f1a3efa39f0d12.jpg"; $str_to_insert = "_thumb"; $pos = 32; $newstr = substr_replace($oldstr, $str_to_insert, $pos, 0); 

    Documentation link