Skip to content

Instantly share code, notes, and snippets.

@donaldallen
Last active December 18, 2015 18:10
Show Gist options
  • Save donaldallen/5824108 to your computer and use it in GitHub Desktop.
Save donaldallen/5824108 to your computer and use it in GitHub Desktop.
// Being sent from a form via AJAX that gets URI encoded
list[1]=root&list[68]=root&list[67]=root
// Data from $this->input->data
list%5B1%5D%3Droot%26list%5B68%5D%3Droot%26list%5B67
<?php
$parts = parse_url($this->input->post('data'));
$query = array();
parse_str($parts['path'], $query);
print_r($query);
?>
// Results
Array
(
[list] => Array
(
[1] =>
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment