TPLix

No results for ""

Strip

1 min read Jun 2, 2026
--- title: strip autoseo: enabled: true theme: learn2 child_type: default admin: children_display_order: collection visible: true ---

strip — This replaces all spaces, newlines and tabs with a single space, or with the supplied string.

Basic Usage:
{$articleTitle|strip}

Examples:

<?php
$tplix->assign('articleTitle', "Grandmother of\neight makes\t    hole in one.");

Where the template is:

{$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.

Leave a Comment

Not published. Used to notify you on approval.

Comments are moderated before appearing.