banner image

What is URI Segment ?

What is url ?

-  URL stands for Uniform Resource Locator.
-  url is the address to particular webiste in the browser.
-  example :

What is URI segment in php or how to get value from url ?

URI segment is the function that help to get parameters from url in browser. the parameter may be in the form of string or encoded array form.

syntax : $this->uri->segment(number);

Here number is the parameter position , like

example :  $this->uri->segment(1);

here is considered as 0 parameter position
here pages is considered as 1 parameter position, so if we want to
get 1st parameter value then,

echo  $this->uri->segment(1);
output :   pages.

What is URI Segment ? What is URI Segment ? Reviewed by Admin on March 20, 2020 Rating: 5

No comments:

Powered by Blogger.