Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Smarty Report tool question

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
Edufa
Smarty n00b


Joined: 05 Feb 2005
Posts: 2

PostPosted: Sat Feb 05, 2005 4:11 pm    Post subject: Smarty Report tool question Reply with quote

For using smarty into my reports i need multi-level group information

For example, I have a array

Code:
Array
(
    [0] => Array
        (
            [name] => John
            [group] => URB 12
            [date] => 3/2/2005
            [value] => 125.23
        )
    [1] => Array
        (
            [name] => Petter
            [group] => URB 12
            [date] => 3/3/2005
            [value] => 12.25
        )
    [2] => Array
        (
            [name] => John
            [group] => URB 13
            [date] => 3/1/2005
            [value] => 1.55
        )
...
)


I would like a function to group this information for name, or group, or date, etc, generation a array like this.

group by name:

Code:
Array
(
    [0] => Array
        (
            [name] => John
            [value] => Array
                (
                    [0] => Array
                        (
                           [group] => URB 12
                           [date] => 3/3/2005
                           [value] => 12.25
                        )

                    [1] => Array
                        (
                           [group] => URB 13
                           [date] => 3/1/2005
                           [value] => 1.55
                        )

                )

        )

    [1] => Array
        (
            [nome] => Petter
            [value] => Array
                (
                    [0] => Array
                        (
                           [group] => URB 12
                           [date] => 3/3/2005
                           [value] => 12.25
                        )
                )
        )
...
)


With this function i could make robust reports quickly. The user chose the group field and the function auto-rebuild the array.

This exist ?


Thanks
Sorry my bad english
Back to top
View user's profile Send private message
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Sun Feb 06, 2005 1:43 am    Post subject: Reply with quote

I'm working on something similar (but not exactly the same) : http://www.phpinsider.com/smarty-forum/viewtopic.php?t=4125

I can't promise when (or if!) it will be completed but at present, I am intending to improve it. Ideas and suggestions are welcome.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Plugins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP