-3

http://www.example.com/ci_admin_jaspud/index.php/admin/add_member/id/7/created_sort/asc

how can i get the value of multiple query strings in above url using codeigniter?

2 Answers2

0

URI class is loaded automatically and you can use the segment() method to retrieve the data

$this->uri->segment(4)

to get the 7

More info: http://ellislab.com/codeigniter/user-guide/libraries/uri.html

jtheman
  • 7,421
  • 3
  • 28
  • 39
0

Try:

$this->load->library('uri');
echo $this->uri->segment(4);

The URI Class provides functions that help you retrieve information from your URI strings.

Codeigniter URI class

hsuk
  • 6,770
  • 13
  • 50
  • 80