Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function sub_array($array, $sub_key)
- {
- $new_array = array();
- if(is_array($array) AND $array)
- {
- foreach($array as $key => $data)
- {
- $new_array[$key] = $data[$sub_key];
- }
- }
- return $new_array;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement