arrays in arrays in arrays in a array?

Discussion in 'PHP' started by dcole07, Jul 9, 2006.

  1. #1
    Can I have arrays in arrays

    I have an array that is a dynamic length... but now I want to break each string ($array[#]) into an array

    so I'm going to be given a string, I may break it into 2 groups if needed. Then I will break each of those possible 2 groups in to another set of groups. Then I will break each of those groups down again, with this last break I will need to take each key to find what I need.

    Example: ABCDEFGHIJKLMNOPQRSTUVWXYZ
    break into: [ABCDEFGHIJ]; [KLMNOPQRSTUVWXYZ]
    break into: [[ABC], [DEF], [GHIJ]]; [[KL], [MNOP], [QRST], [UVW], [XYZ]]
    break into: [[[AB], [C]], [[DEF]], [[GH], [IJ]]]; [[[KL]], [[MN], [OP]], [[QR], [ST]], [[UVW]], [[XYZ]]]
    Then take each charactor: [[[A, B], [C]], [[D, E, F]], [[G, H], [I, J]]]; [[[K, L]], [[M, N], [O, P]], [[Q, R], [S, T]], [[U, V, W]], [[X, Y, Z]]]

    so can I have arrays in arrays or how can I know what I have with something like that above...
     
    dcole07, Jul 9, 2006 IP
  2. sandossu

    sandossu Guest

    Messages:
    2,274
    Likes Received:
    88
    Best Answers:
    0
    Trophy Points:
    0
    #2
    yes you can. after that you will call themby array[array][array][array]
     
    sandossu, Jul 9, 2006 IP