I am trying to sort an array comprised of $_POST variables. I need to group these variables so that all similiar numeric values are correlated together. For example (h1,f1,g1,p1), (h2,f2,g2,p2),etc. Creating this grouping will allow me to insert them in to my db more efficiently.
What is the best way to do this?
Thx in advance.
alex
Array
(
[h1] => 4
[h2] => 4
[h3] => 4
[h4] => 4
[h5] => 4
[h6] => 4
[h7] => 4
[h8] => 4
[h9] => 4
[f1] => Y
[f2] => Y
[f3] => Y
[f4] => Y
[f5] => Y
[f6] => Y
[f7] => Y
[f8] => Y
[f9] => Y
[g1] => N
[g2] => Y
[g3] => Y
[g4] => N
[g5] => Y
[g6] => Y
[g7] => N
[g8] => Y
[g9] => Y
[p1] => 1
[p2] => 2
[p3] => 2
[p4] => 2
[p5] => 2
[p6] => 2
[p7] => 2
[p8] => 2
[p9] => 2
[h10] => 5
[h11] => 4
[h12] => 4
[h13] => 4
[h14] => 4
[h15] => 4
[h16] => 4
[h17] => 4
[h18] => 4
[f10] => Y
[f11] => Y
[f12] => Y
[f13] => Y
[f14] => Y
[f15] => Y
[f16] => Y
[f17] => Y
[f18] => Y
[g10] => Y
[g11] => Y
[g12] => Y
[g13] => Y
[g14] => Y
[g15] => Y
[g16] => Y
[g17] => Y
[g18] => Y
[p10] => 2
[p11] => 2
[p12] => 2
[p13] => 2
[p14] => 2
[p15] => 2
[p16] => 2
[p17] => 2
[p18] => 2
)