Anybody trying to use preg_replace on multidimensional arrays will see that the function is not working for those cases. Here a quick workaround:

 

Enjoy coding …