Tuesday, 23 January 2018

Array change case

Saves the phpinfo() page to an file

function array_changecase($a, $c='l'){
    return array_change_key_case($a,($c=='u') ?
        CASE_UPPER : CASE_LOWER);
}
array_changecase(array("foO" => "bar", "noNe" => 1), 'u')<br/><br/>returns:<br/>array("FOO" => "bar", "NONE" => 1)

0 comments:

Post a Comment