Forums / General / substr string

substr string

Author Message

LORDLIFEN LIFEN

Wednesday 09 June 2010 8:30:06 am

why my code don't match ? i want to extract some words

{$lost_uri="test01 test02 test02"}
{$lost_uri = substr( $lost_uri, 1 )}
{$lost_uri}

Peter Keung

Wednesday 09 June 2010 9:07:30 am

eZ Publish template code for that looks something like this:

{def $lost_uri = "test01 test02 test02"}
{set $lost_uri = $lost_uri|extract( 1 )}
{$lost_uri}

Out of the box, you cannot directly use PHP functions and must "def" and "set" your variables.

See:

http://ez.no/doc/ez_publish/technical_manual/4_x/templates/the_template_language

http://ez.no/doc/ez_publish/technical_manual/4_x/reference/template_operators/strings/extract

http://ez.no/doc/ez_publish/technical_manual/4_x/reference/template_functions/variables

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada