tags:

views:

36

answers:

1

Is there a way (ini setting or otherwise) to change the default quote setting for PHP's htmlenties function? I use it often with array_map which doesn't let you supply additional arguments.

+2  A: 

try this

http://us3.php.net/manual/en/function.array-map.php#84632

or

$r = array( 'afdsasdfasdf<>', '<test ="">' );

function map_entities( $str ) {
    return htmlentities( $str, ENT_QUOTES );
}

$array = array_map ( 'map_entities', $r );
Galen