Skip to content

Instantly share code, notes, and snippets.

@v6ak
Created August 4, 2010 12:29
Show Gist options
  • Save v6ak/508058 to your computer and use it in GitHub Desktop.
Save v6ak/508058 to your computer and use it in GitHub Desktop.
<?php // taková funkcionální pochoutka...
$expcook = explode('; ', $cookiesString);
$lincook = array_map(function($v){return explode('=', $v, 2);}, $expcook);
$cookies = array_combine(array_map(function($v){return $v[0];}, $lincook), array_map(function($v){return $v[1];}, $lincook));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment