How to change all string array lower case alphabet elements to upper case using array_map() method.
array_map() method is a pre build array method available to all php developers. This methods gives us the functionality to convert all array elements into upper case. So here is the complete step by step tutorial for How to convert all array values to uppercase in PHP.
How to convert all array values to uppercase in PHP.
Code for convert-array-values-uppercase.php file.
<!doctype html> <html> <head> <meta charset="utf-8"> <title>Convert all array values to uppercase</title> </head> <body> <?php $Name = array("ram","shyam","anil","pankaj"); $name_convert = array_map("strtoupper", $Name); foreach( $name_convert as $NewArray ) { echo $NewArray . '</br>' ; } ?> </body> </html>
Screenshot: