Skip to content

Instantly share code, notes, and snippets.

@iammart
Last active September 23, 2015 10:29
Show Gist options
  • Select an option

  • Save iammart/78caff9fe56f95c9be3e to your computer and use it in GitHub Desktop.

Select an option

Save iammart/78caff9fe56f95c9be3e to your computer and use it in GitHub Desktop.
Simplify multiple file array
<?php
function simplifyMultiFileArray($files = array()){
$sFiles = array();
if(is_array($files) && count($files) > 0){
foreach($files as $key => $file){
foreach($file as $index => $attr){
$sFiles[$index][$key] = $attr;
}
}
}
return $sFiles;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment