Skip to content

Instantly share code, notes, and snippets.

@gin1314
Created April 27, 2012 09:01
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 gin1314/2507615 to your computer and use it in GitHub Desktop.
Save gin1314/2507615 to your computer and use it in GitHub Desktop.
PHP: codeigniter simulate $_GET parameter
<?php
$url = parse_url( $_SERVER['REQUEST_URI'] );
$get = explode('&', $url['query']);
foreach ($get as $key => $value) {
list($k, $v) = explode('=', $value);
$new_get[$k] = $v;
}
var_dump($new_get['callback']);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment