scon Posted June 8, 2010 Posted June 8, 2010 (edited) Hi! I need to fill multi dimensional array from file: aaa, 23, 34, 345, 123 bbb, 43, 09, 915, 232 ........ ........ Like this Global $array[100][5] = [["aaa", 23, 34, 345, 123],["bbb", 43, 09, 915, 232]] How to make it? For $i=1 To 100 Step 1 ; read and split line from file ($var1, $var2, $var3, $var4, $var5) - it's easy _ArrayAdd($array, ? ) ; how include here $var1, $var2, $var3, $var4, $var5 ? Next Edited June 8, 2010 by scon
Makaule Posted June 8, 2010 Posted June 8, 2010 You may just use something like this: Global $array[101][6] Global $i = 1, $j = 1 For $i = 1 to 100 step 1 For $j = 1 to 5 step 1 $array[$i][$j] = $var Next Next
jaenster Posted June 8, 2010 Posted June 8, 2010 _ArrayAdd doens't work with multi dimensional array's. you should do it your self in this case. What makaule said -jaenster
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now