# Create a multidimensional array from txt file

**URL:** <https://forum.kirupa.com/t/create-a-multidimensional-array-from-txt-file/66704>\
**Category:** flash\
**Created:** [October 8, 2004, 4:06am UTC](https://forum.kirupa.com/t/create-a-multidimensional-array-from-txt-file/66704 "2004-10-08T04:06:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dominus](https://avatars.discourse-cdn.com/v4/letter/d/b5ac83/32.png) [@dominus](https://forum.kirupa.com/u/dominus)\
**Post date:** [October 8, 2004, 4:06am UTC](https://forum.kirupa.com/t/create-a-multidimensional-array-from-txt-file/66704/1 "2004-10-08T04:06:04Z")

</div>

that’s the text within the txt file… i generated a while ago… and the page where i got the tutorial from is no longer avaiable ☹

“noSplits=4&p=problema1!raspuns1!raspuns2!raspuns3!raspuns4!raspuns5~problema2!raspuns1!raspuns2!raspuns3!raspuns4!raspuns5~problema3!raspuns1!raspuns2!raspuns3!raspuns4!raspuns5~problema4!raspuns1!raspuns2!raspuns3!raspuns4!raspuns5”

i remember that it used the split() function for a number of noSplits(eg: 4)… i need a multidimensional array like this:

a[1][0]=problema1  
a[1][1]=raspuns1  
a[1][2]=raspuns2  
a[1][3]=raspuns3  
a[1][4]=raspuns4  
a[1][5]=raspuns5  
a[2][0]=problema2  
…  
a[4][5]=raspuns5

if someone could help me i would greatly apreciate it… the txt file doesn’t need to have the same sintax as the one i wrote… i want to create an array with 100\*6 components… and read all the values from the txt file… thank you very much again
