Categories > TinyButStrong general >

Merging subarrays

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: RwD
Date: 2005-11-04
Time: 19:10

Merging subarrays

I have
By: RwD
Date: 2005-11-04
Time: 19:11

Re: Merging subarrays

Euh, I thought I pressed cancel...
By: RwD
Date: 2005-11-04
Time: 19:41

Re: Merging subarrays

Going to ask my question anyway.

I have an array like this:
Array
(
  [0] => Array
    (
      [article_id] => 1
      [article_nr] => art01
      [title_id] => Testarticle
      [props] => Array
        (
          [0] => Array
            (
              [prop_id] => 1
              [p_group_id] => Color
            )

          [1] => Array
            (
              [prop_id] => 5
              [p_group_id] => Size
            )
        )
    )

  [1] => Array
    (
      [article_id] => 4
      [article_nr] => test04
      [title_id] => Testarticle 04
      [props] => Array ()
    )

  [2] => Array
    (
      [article_id] => 9
      [article_nr] => test08
      [title_id] => Testarticle08
      [props] => Array ()
    )
)
It is an array with three articles. The first article has specific properties namely a size and a color. The other two articles have no special properties. The Articles array is mergable using mergeblock and that works just fine. But I want the properties array merged with a function like mergeblock as well and put them into -let's say- a listbox.

I can't seem to get it to work with only 1 template and 1 php script. I can get it to work with more then one template and 1 php script.

Is there any way of doing what I want in tbs that I seem to have missed? If not, what would then be the best solution?