Skip to content

Instantly share code, notes, and snippets.

@betatea
Created December 22, 2010 12:05
Show Gist options
  • Select an option

  • Save betatea/751435 to your computer and use it in GitHub Desktop.

Select an option

Save betatea/751435 to your computer and use it in GitHub Desktop.
function foo($x)
{
$temp = array(); // Declare empty array
if (count($x) > 0)
{
foreach ($x as $key => $value)
{
$temp[$key] = $value;
}
}
return $temp;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment