Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Smarty substr string skip first characters

The variable $siteroot contains a string that looks like:

http://www.example.nl/folder/

To get the part http://www.example.nl/ you use:

{$siteroot|substr:0:22}

But i want to skip this part and return /folder/

The length of the folder is unknown.

like image 666
Maarten Kuilman Avatar asked Nov 14 '12 10:11

Maarten Kuilman


1 Answers

{$siteroot|substr:22}

Should work

like image 166
Eugene Avatar answered Sep 28 '22 06:09

Eugene