slash_segment($n[, $where = 'trailing'])
Parameters: |
|
---|---|
Returns: |
Segment value, prepended/suffixed with a forward slash, or a slash if not found |
Return type: |
string |
This method is almost identical to segment()
, except it adds a trailing and/or leading slash based on the second parameter. If the parameter is not used, a trailing slash added. Examples:
$this->uri->slash_segment(3); $this->uri->slash_segment(3, 'leading'); $this->uri->slash_segment(3, 'both');
Returns:
- segment/
- /segment
- /segment/
Please login to continue.