1
I’m trying to use the function array_map
to apply a function to all indices of a array
after executing the code it brings this array
array (size=13)
0 =>
array (size=1)
'name' => string 'a' (length=20)
1 =>
array (size=1)
'name' => string 'b' (length=25)
2 =>
array (size=1)
'name' => string 'c' (length=20)
3 =>
array (size=1)
'name' => string 'd' (length=19)
what I want and that all the values of each index be uppercase used so
array_map('strtoupper', $Results);
after executing it from the error as precise informs the index this way
array_map('strtoupper', $Results[0]);
ai it works more apply the function only at index 0 getting like this
array (size=13)
0 =>
array (size=1)
'name' => string 'A' (length=20)
1 =>
array (size=1)
'name' => string 'b' (length=25)
2 =>
array (size=1)
'name' => string 'c' (length=20)
3 =>
array (size=1)
'name' => string 'd' (length=19)
more I want to apply in all indexes.
Or https://ideone.com/L0EyuV
– bfavaretto
also @bfavaretto
– novic