I want to change 'value2' to 'My string'. I know this is possible by using the array keys but I wonder if it's a cleaner way.
$nested_array[] = array('value1', 'value2', 'value3');
foreach($nested_array as $values){
foreach($values as $value){
if($value == 'value2'){
$value = 'My string';
}
}
}