Voting

: three plus six?
(Example: nine)

The Note You're Voting On

Dario
6 years ago
I was looking for how to change values of array since you can't pass array by reference anymore in new PHP versions, here is simple solution

<?php
array_walk_recursive
(
$myArray,
function (&
$value) {
if (
/*some condition*/) {
$value = 'New value';
}
}
);
?>

After that $myArray will be altered with new value.

<< Back to user notes page

To Top