Yes, just pass the result of one match to another:
$result = array_map( 'mysql_real_escape_string', array_map( 'trim', array_map( 'strtoupper', $your_array ) ) );
You can also use the callback in PHP 5.3+:
$result = array_map(function($x){ return mysql_real_escape_string(trim(strtoupper($x))); }, $your_array);
or earlier (in PHP versions below 5.3):
$result = array_map( create_function('$x','return mysql_real_escape_string(trim(strtoupper($x)));'), $your_array );
Tadeck
source share