dcole.ath.cx Posted April 9, 2006 Share Posted April 9, 2006 So I have a form that sends a php file 324 variables. I wondering how to print these variables in groups of 4, then puting the group in sets of 9 (so like 9 rows and 9 columns)9 X 9 X 4the var are every combo XYZ, where: X= A --> D (1-4),Y= A --> I (1-9),Z= A --> I (1-9),(AAA - DII)This was the easiest way was make the dynamic form.The variables equal 1 or null, if they equal null I will make them equal 0Then final product will be a 9 X 9 binary map that tells each box which sides (T,R,B,L) are on or off.a 3X3X4 binary map looks like this:[["0000", "0000", "0000"], ["0000", "0000", "0000"], ["0000", "0000", "0000"]]one 0 replaced a variable like $AAAso it would have looked like:[["$AAA$BAA$CAA$DAA", "$ABA$BBA$CBA$DBA", "$ACA$BCA$CCA$DCA"], ["$AAB$BAB$CAB$DAB", "$ABB$BBB$CBB$DBB", "$ACB$BCB$CCB$DCB"]]But I need a 9X9X4 Link to comment Share on other sites More sharing options...
Selacius Posted April 9, 2006 Share Posted April 9, 2006 Why do you need this if I may ask? Wat are you trying to do? Link to comment Share on other sites More sharing options...
dcole.ath.cx Posted April 9, 2006 Author Share Posted April 9, 2006 well I'm making a form to make binary maps for a tilt maze game.There is always the long way of writing it out by 0's and 1's but that takes too long. I want a more graphic way and a form will do that. Link to comment Share on other sites More sharing options...
reportingsjr Posted April 11, 2006 Share Posted April 11, 2006 You want to write a map using binary? thats going to ######.. I dont know binary code lol. Hmm, maybe you could do a function so that it adds your four variables together? I dont know though.. Link to comment Share on other sites More sharing options...
dcole.ath.cx Posted April 13, 2006 Author Share Posted April 13, 2006 Well atleast I went down from the 50 X 50 X 4... that would have been 10,000 vars. Then I would have had to look out for 'copy' and other funky stuff...I put this project on the back burner.. I need time to think about it. Link to comment Share on other sites More sharing options...
justsomeguy Posted April 19, 2006 Share Posted April 19, 2006 You can always just use a multidimensional array.$values[$x][$y][$z];Where 0 <= $x <= 80 <= $y <= 80 <= $z <= 3 Link to comment Share on other sites More sharing options...
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