Skip to content

Instantly share code, notes, and snippets.

@yeco
Created May 25, 2010 00:40
Show Gist options
  • Select an option

  • Save yeco/412610 to your computer and use it in GitHub Desktop.

Select an option

Save yeco/412610 to your computer and use it in GitHub Desktop.
/**
* @Push and element onto the end of an array with associative key
*
* @param array $array
*
* @string $key
*
* @mixed $value
*
* @return array
*
*/
function array_push_assoc($array, $key, $value){
$array[$key] = $value;
return $array;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment