get([$index = NULL[, $xss_clean = NULL]])
Parameters: |
|
---|---|
Returns: |
$_GET if no parameters supplied, otherwise the GET value if found or NULL if not |
Return type: |
mixed |
This method is identical to post()
, only it fetches GET data.
$this->input->get('some_data', TRUE);
To return an array of all GET items call without any parameters.
To return all GET items and pass them through the XSS filter set the first parameter NULL while setting the second parameter to boolean TRUE.
$this->input->get(NULL, TRUE); // returns all GET items with XSS filter $this->input->get(NULL, FALSE); // returns all GET items without XSS filtering
To return an array of multiple GET parameters, pass all the required keys as an array.
$this->input->get(array('field1', 'field2'));
Same rule applied here, to retrive the parameters with XSS filtering enabled, set the second parameter to boolean TRUE.
$this->input->get(array('field1', 'field2'), TRUE);
Please login to continue.