You are here

function _skinr_array_splice in Skinr 7.2

Helper function to remove a portion of an array and replace it with something else.

1 call to _skinr_array_splice()
_skinr_preprocess_attached in ./skinr.module

File

./skinr.module, line 1395
Handles core Skinr functionality.

Code

function _skinr_array_splice(array &$array, $offset, $length = 0, array $replacement = NULL) {
  if (is_null($replacement)) {
    $replacement = array();
  }
  $array = array_slice($array, 0, $offset, true) + $replacement + array_slice($array, $offset + $length, NULL, true);
}