Are there a simple function or functions that I can call to trim all the array values and make them all upper case?
Or I have to use
for ($index=0; $index<count($myarray); $index++) { $myarray[$index]=strtoupper(trim( $myarray[$index])); }
make what uppercase, ALL letters? like foo foo becomes FOO FOO ???
strtoupper() does that....
unless you want:
ucfirst(); // capitalize first letter in a string. ucword(); // capitalize all first letters in a string.
Yes, i am using for loop to loop around all the array elements and applying the strtoupper() to each of them.
I would like to know if there is an array function to do it without using for loop like I did in my example codes.
Thanks!
You can use [man]map[/man], but it would probably be slower than the loop.