How to order an array?

Author Message

luis muñoz

Monday 09 July 2007 4:57:18 am

The problen is:

When i concat the result of two fetch or create an array after several fetch the resulting array is obviously ordered in the same way i concated the elements. How can i reoder the array? I don't need ordering by any special attribute, default order is enought.

So, is there any operator to order the elements in an array? I've been searching in the docs but couldn't find one.

Thanks,
Luis Muñoz

Renaud Patrick

Monday 09 July 2007 6:44:51 am

Hello Luis,

I guess you'll find the answer you're looking for there : http://ez.no/ezpublish/documentation/development/kernel/custom_template_operators

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 18:32:59
Script start
Timing: Jan 18 2025 18:32:59
Module start 'layout'
Timing: Jan 18 2025 18:32:59
Module start 'content'
Timing: Jan 18 2025 18:33:00
Module end 'content'
Timing: Jan 18 2025 18:33:00
Script end

Main resources:

Total runtime0.7364 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.0053 587.8906152.6094
Module start 'layout' 0.00530.0026 740.500039.4141
Module start 'content' 0.00790.7271 779.9141456.7109
Module end 'content' 0.73490.0014 1,236.62508.1875
Script end 0.7364  1,244.8125 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4461160.0002
Check MTime0.00130.1709160.0001
Mysql Total
Database connection0.00080.110410.0008
Mysqli_queries0.699695.0007540.0130
Looping result0.00040.0572520.0000
Template Total0.709896.420.3549
Template load0.00180.245620.0009
Template processing0.708096.139320.3540
Template load and register function0.00010.016010.0001
states
state_id_array0.00110.155510.0011
state_identifier_array0.00090.126020.0005
Override
Cache load0.00150.2009110.0001
Sytem overhead
Fetch class attribute can translate value0.00060.077720.0003
Fetch class attribute name0.00110.146820.0005
XML
Image XML parsing0.00020.028520.0001
class_abstraction
Instantiating content class attribute0.00000.000820.0000
General
dbfile0.00060.0790100.0001
String conversion0.00000.001140.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/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/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs