Path / documentation / ez publish / technical manual / 4.x / reference / template operators / strings / explode / explode/implode as string r...

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

Explode/Implode as string replacement

If you're in a pinch, you can pair explode and implode to do very basic string replacement:

{def $x="My-Dog-Has-Fleas"}
{def $y=$x|explode('-')|implode(' ')}

will print "My Dog Has Fleas"

Anonymous User (05/03/2009 3:57 pm)

Anonymous User (05/03/2009 3:57 pm)


There are no comments.