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
| <?php | |
| /** | |
| * @param object|int|string $object | |
| * @return string | |
| */ | |
| function get_object_type($object){ | |
| $workable = false; | |
| $object_type = gettype($object); | |
| switch($object_type){ |
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
| <?php | |
| /** | |
| * @param array $needle | |
| * @param array $haystack | |
| * @param $position | |
| * @return array | |
| */ | |
| function inject_this_array($needle=array(),$haystack=array(),$position){ | |
| $new_holder1 = array_slice($haystack, 0, $position, true); | |
| $new_holder2 = array_slice($haystack, $position, count($haystack)-1,true); |
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
| <?php | |
| /** | |
| * @param int $position | |
| * @param bool|true $echo | |
| * @return bool | |
| */ | |
| function the_slug($position=1,$echo=false){ | |
| $url = parse_url($_SERVER['REQUEST_URI']); | |
| $slugs = array_filter(explode('/',$url['path'])); |
NewerOlder