Answers for "get value from url codeigniter"

PHP
1

get current url in codeigniter

simple get like this

echo $this->input->get('my_id');
Load the URL helper To get current url

$currentURL = current_url(); //http://myhost/main

$params   = $_SERVER['QUERY_STRING']; //my_id=1,3

$fullURL = $currentURL . '?' . $params; 

echo $fullURL;   //http://myhost/main?my_id=1,3
Posted by: Guest on March-03-2021
0

codeigniter get parameter from url

//If your your need to first parameter use it.
$this->uri->segment('3');

//And your need second parameter use it
$this->uri->segment('4');

//Have your many parameter enhance parameter
Posted by: Guest on September-09-2021

Browse Popular Code Answers by Language