[eluser]faluci[/eluser]
** I've gooled for hours, and searched within stackoverflow. Found a few similar ones, but couldn't find a good answer yet.**
I'm thinking of rewriting my project using codeigniter.
I have a search.php with possible querystring:
Code:
search.php?o=1&kk=1&k=sales&kx;=&w=4&l=New+York,+NY,+USA&i=222&i=229&i=225&i=238&i=237&i=203&el=3&eu=10&ei=on&d=5&d=4&d=9&d=6&at;=&a=Any
Please note that $_GET['i'] & $_GET['d'] could be arrays.
I found some mentioned about
Code:
$this->url->uri_to_assoc();
hoping I maybe able to retrieve $_GET values as
Code:
/i/222/i/229/i/225/i/238/i/237/i/203
or
Code:
/i/222/229/225/238/237/203
So I tested with
controllers/show.php
Code:
class show extends CI_Controller
{
function get()
{
echo "<pre>";
print_r ($this->uri->uri_to_assoc());
echo "</pre>";
}
}
when I input in url as the following,
Code:
http://localhost/index.php/show/get/l/0123/l/52/l/l2
the above code only returns the last input.
My actual question is, in Codeigniter
from url above, is there a way to retrive as an array as
Code:
Array
(
[0] => 0123,
[1] => 52,
[2] => 12
)
or similar NOT using Querystring? ('cos if I enable Querystring I cant use other Codeigniter helping features etc)
so I want my old project's querystring as an array something like
Code:
Array
(
[d] => array ([0] => 123, [1] => 456),
[i] => array ([0] => 11, [1] => 99),
[dx] => 1,
[dy] => 'New+York'
)
etc etc