Multi Dimenssion Array

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ahmed786
    New Member
    • Apr 2010
    • 2

    Multi Dimenssion Array

    Hello,

    I have read all the images which are availaible in a file into an array.
    for example :

    Code:
    Array
    (
        [0] => /image/default/counter/test.png
        [1] => /image/default/counter/test2.jpg
        [2] => /image/default/list.png
        [3] => 
    )
    Now I have an another array which contain the list of template or files,from which I have read the Images.

    Code:
    Array
    (
    [0] => /home/domainusers/image.html
    [1] => /home/domainusers/html/default/counter/blah.html
    [2] => /home/domainusers//html/default/counter/tesz.html
    )
    Now,I have to join this two array's in such way,The key sould be Image and template should be a value.and the key should reference the html file from where I read the Images.

    for example.If I have read the image form test.html.my array shoul look like this
    Code:
    Array
    (
        [0] => /image/default/counter/test.png
               =>array ([0]=> /home/pic/test.html
                              )
    )
    Any help would be appreciated.

    Thanks In Advance

    Mohamad
    Last edited by Dormilich; Apr 21 '10, 12:41 AM. Reason: Please use [code] tags when posting code
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    try array_combine().

    Comment

    Working...