-
Notifications
You must be signed in to change notification settings - Fork 35
strip
Umakant Patil edited this page Aug 14, 2017
·
3 revisions
Replaces all spaces, newlines and tabs with a single space, or with the supplied string.
Note:- If you want to strip blocks of template text, use the built-in {strip} function.
Parameter Position | Type | Required | Default | Description |
---|---|---|---|---|
1 | string | No | one space | This value is replace when srtiping space, new line and tabs. |
Template:
{$articleTitle = "Grandmother of\neight makes\t hole in one."}
{$articleTitle}
{$articleTitle|strip}
{$articleTitle|strip:' '}
output:
Grandmother of
eight makes hole in one.
Grandmother of eight makes hole in one.
Grandmother of eight makes hole in one.
see also strip in PHP Smarty documentation.