- print_r: documentation ( source)
- array_walk_recursive: documentation ( source)
<?php
$a = array(
'hello' => array('facebook', 'instagram ' ),
'ok' => 'string'
);
array_walk_recursive($a, function(&$value){
// $value = trim($value);
});
// OUTPUT
print_r($a); // Gives: 1