This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* in_arrayi | |
* Case insensitive in_array(). | |
* | |
* @since 1.0.0 | |
* @version 1.0.0 | |
**/ | |
function in_arrayi($needle, $haystack){ | |
return in_array(strtolower($needle), array_map('strtolower', $haystack)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* array_flatten | |
* Flattens any array. | |
* | |
* @since 1.0.0 | |
* @version 1.0.0 | |
**/ | |
function array_flatten($array){ | |
$return = array(); | |
array_walk_recursive($array, function($a) use (&$return) { $return[] = $a; }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* p | |
* Better print_r() for debugging purposes. | |
* | |
* @since 1.0.0 | |
* @version 1.0.0 | |
**/ | |
function p($data){ | |
$debug = debug_backtrace(); |
NewerOlder