Forums / Developer / explode() function in template?

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

explode() function in template?

Author Message

Roberto Sacchi

Wednesday 18 February 2009 8:22:26 am

how to explode a string using template language?

Example in php:

$pizza  = "piece1 piece2 piece3 piece4 piece5 piece6";
$pieces = explode(" ", $pizza);
echo $pieces[0]; // piece1
echo $pieces[1]; // piece2

Roberto Sacchi

Wednesday 18 February 2009 8:28:29 am

ok, found it at manual at page 1190.

It's exactly the same:

input|explode(separator)

:P