Hi, I've got this code which does work.

It runs HTMLPurifier on the last values in a multi-array which is written to an ini fiile using PEAR::Config_Lite.

I spoofed a Purifier class in order to explain my question.

Is there anything similar to array_map that I could run on a class method instead of this nested foreach loop, which I really don't like looking at.

PHP Code:
// incoming
$test['en']['this'] = 'that';
$test['en']['the'] = 'other';
$test['fr']['this'] = 'ceci';
$test['fr']['the'] = 'cela';

class 
Purifier{  // spoofing the real class
  
function purify($x){
  return 
$x '!'
  }
}

$purifier = new Purifier ;
   
$config = array();

    foreach(
$test as $lang=>$array){
        
$r = array();
        foreach(
$array as $k=>$v){  // buerk!
        
$r[$k]  = $purifier->purify($v);
        }
        
$config[$lang] = $r;
    }

die(
var_export($config)); 
Or is there really no other way?