The general name for this is a WYSIWYG editor. There are many implementations you can use, but two popular ones are CKEditor (used here I think) and TinyMCE (what I typically use)
array_map doesn't pass the array key. You could call it with two arrays (the first of values and second of keys) but that would reindex the array.
array_walk with the value by-reference would work. As would a simple foreach loop.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.