Skip to content
Advertisement

Having problems updating values in with array_walk_recursive

I’m working on code which needs to str_replace colons with spaces. Since i don’t know how deep my array will go i have to use array_walk_recursive function. The problem is that str_replace is not taken in to the account (read is not working). Please help me out guys.

This is my code

JavaScript

and output is following

JavaScript

So how to properly update values in my array? If you need any additional informations, please let me know and i will provide. Thank you!

Advertisement

Answer

While sending reference, you need to overwrite the old value.

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement