Skip to content

Instantly share code, notes, and snippets.

@jrtashjian
Created June 28, 2011 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrtashjian/1051145 to your computer and use it in GitHub Desktop.
Save jrtashjian/1051145 to your computer and use it in GitHub Desktop.
Passing params as an array
<?php
function create( $params = array() )
{
$defaults = array(
'param_one' => '',
'param_two' => time(),
'param_three' => 0,
);
$params = array_merge($defaults, $params);
// do your fancy code.
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment