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';

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

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

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

Or is there really no other way?