jasonstairs Posted June 29, 2007 Share Posted June 29, 2007 Hello, I see that there is an <a href="http://us.php.net/manual/en/function.array-change-key-case.php">array_change_key_case()</a> function, but is there one to change the case of an array value, ie., array_change_value_case()? Quote Link to comment Share on other sites More sharing options...
akitchin Posted June 29, 2007 Share Posted June 29, 2007 yes, it's called array_map(): array_map('strtoupper', $array); you'll need to make a recursion to make sure it hits every level, but check the comments on the function in the manual - someone's already done that for you. Quote Link to comment Share on other sites More sharing options...
jasonstairs Posted June 29, 2007 Author Share Posted June 29, 2007 Thank you, that did the job! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.