Hoe do I make an array's contents lowercase?

How do I make all the values in my array lowercase? Is there an array function that can this?

thanks in advance,

in java.lang package,
one method is available called toLowerCase(Locale)
u can convert to lowercase array of contents.


array_map( ‘strtolower’ , $array );

Thanks for the reply. But it just outputs ArrayArrayArray

// Make all the elements lowercase
for($i=0; $i<count($articlesLower); $i++)
   echo array_map( 'strtolower' , $articlesLower );

Got it:

echo strtolower ($articlesLower[$i]) . "<br />";

No, I posted the 2 functions that you need to find out about, I expected you to go and look up how to make it work in the manual.

$a = array( 

// remap here
$b= array_map('strtolower' , $a );

var_dump( $b );

array(3) {
  string(5) "upper"
  string(5) "upper"
  string(5) "upper"

i thougt that for java coding friend.soory
php i dont know…

If you are still having problems, and simple way to perform this is to loop through the array using foreach() and use strtolower on each value inside of the array.

To put the above into code:

$arr = array("A", "B", "C");
foreach($arr as $key => &$value){
    $value = strtolower($value);

However array_map() is what you should use (just don’t echo it).