Skip to content

Instantly share code, notes, and snippets.

@jbrooksuk
Created November 3, 2011 16:37
Show Gist options
  • Save jbrooksuk/1336986 to your computer and use it in GitHub Desktop.
Save jbrooksuk/1336986 to your computer and use it in GitHub Desktop.
raise_array
<?php
function raise_array(array $arArray, $arKey) {
if(is_array($arArray[$arKey])) {
$arValues = $arArray[$arKey];
foreach($arValues as $aValue) {
$arArray[] = $aValue;
}
unset($arArray[$arKey]); // Remove key'ed value.
return $arArray;
}else{
return false;
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment