I need all words to be in proper case, with first letters capitalized and others lower case.
I tried:
array_walk_recursive($my_array,'ucwords');
But I guess the function needs to be user-defined.
So I wrote:
function ucrecursive($value,$key) {
return ucwords($value);
}
array_walk_recursive(&$my_array,'ucrecursive');
Still doesn’t work. Any ideas?
EDIT: sample data:
Array
(
[0] => Array
(
[count] => 768
[value] => SATIN NICKEL
)
[1] => Array
(
[count] => 525
[value] => POLISHED CHROME
)
[2] => Array
(
[count] => 180
[value] => AGED BRONZE
)
etc…
Should be pretty easy to build it yourself: