A WordPress-centric search engine for devs and theme authors



wp_kses_array_lc ›

Since1.0.0
Deprecatedn/a
wp_kses_array_lc ( $inarray )
Parameters:
  • (array) $inarray Unfiltered array
    Required: Yes
Returns:
  • (array) Fixed array with all lowercase keys
Defined at:
Codex:

Goes through an array and changes the keys to all lower case.



Source

function wp_kses_array_lc($inarray) {
	$outarray = array ();

	foreach ( (array) $inarray as $inkey => $inval) {
		$outkey = strtolower($inkey);
		$outarray[$outkey] = array ();

		foreach ( (array) $inval as $inkey2 => $inval2) {
			$outkey2 = strtolower($inkey2);
			$outarray[$outkey][$outkey2] = $inval2;
		} // foreach $inval
	} // foreach $inarray

	return $outarray;
}