Exploding on a Newline

Author Message

Deane Barker

Tuesday 30 November 2004 11:58:52 am

How would I explode on a newline?

I've tried...

{let pieces=$node.object.data_map.my_string.content|explode("\n")}

...but it didn't work.

Christoph von Siebenthal

Saturday 15 November 2008 1:13:06 pm

In php chr(10) instead of "\n" works.

I think array( 10)|chr() instead of "\n" should work for this purpose.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 10:39:38
Script start
Timing: Jan 18 2025 10:39:38
Module start 'layout'
Timing: Jan 18 2025 10:39:38
Module start 'content'
Timing: Jan 18 2025 10:39:39
Module end 'content'
Timing: Jan 18 2025 10:39:39
Script end

Main resources:

Total runtime0.8182 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0084 587.8047152.6094
Module start 'layout' 0.00850.0030 740.414139.4141
Module start 'content' 0.01140.8052 779.8281499.2656
Module end 'content' 0.81660.0015 1,279.09388.1875
Script end 0.8182  1,287.2813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00350.4312160.0002
Check MTime0.00140.1770160.0001
Mysql Total
Database connection0.00260.320510.0026
Mysqli_queries0.770394.1486540.0143
Looping result0.00090.1132520.0000
Template Total0.760993.020.3805
Template load0.00220.265720.0011
Template processing0.758792.733120.3794
Template load and register function0.00010.011810.0001
states
state_id_array0.00600.728810.0060
state_identifier_array0.00230.278120.0011
Override
Cache load0.00170.2113120.0001
Sytem overhead
Fetch class attribute can translate value0.00130.163120.0007
Fetch class attribute name0.00170.207140.0004
XML
Image XML parsing0.00100.123220.0005
class_abstraction
Instantiating content class attribute0.00000.001040.0000
General
dbfile0.00110.1327220.0000
String conversion0.00000.000740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs