gwolgamott Posted January 27, 2010 Share Posted January 27, 2010 Okay my grasp on arrays just seems whacked lately... I can understand them one day and not another... anyways issue I have is this: $Array_indexed[0] = "Something1"; $Array_indexed[1] = "Something1!sub1!partA"; $Array_indexed[2] = "Something1!sub2"; $Array_indexed[3] = "Something2"; take that exampled of what I have and I want to sort it in some sort of an array that after I delimit element 2 or 3... somehow make an overall array using multidimensional arrays. This is where I get lost and seem I can't get it to sort and go into something like this: $array_multi[0] = "Something1"; $array_multi[0][0] = "sub1"; $array_multi[0][0][0] = "part A"; $array_multi[0][1]="sub2"; $array_multi[1] = "Something2"; Or do I have this all wrong? I have a feeling I'm thinking of this in the wrong way. Quote Link to comment Share on other sites More sharing options...
RussellReal Posted January 27, 2010 Share Posted January 27, 2010 you CAN make multi dimensional arrays, however, you need to specify whether or not it will be an array.. 2 examples $array = array(); $array[0] = array(); $array[0][0] = "hi"; $array[0][1] = "howdy!"; $array[1] = array(); $array[1][0] = "hello"; $array[1][1] = "omgosh!"; example number two: $array = array(array("hi","howdy"),array("hello","omgosh!")); Quote Link to comment Share on other sites More sharing options...
gwolgamott Posted January 28, 2010 Author Share Posted January 28, 2010 OK I've got you. Sometimes it's the screwiest things that slip me up. Thank-you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.