Zeroanarchy
Technical User
Okay I have tried numerous functional examples and have been at it for two days now. I seem to be having an issue sorting a column.
Here is the output via print_r
------------------------------------------------------
Array ( [0] => A0034 [1] => 4 [2] => 1 )
Array ( [0] => A0035 [1] => 18 , 9 , 14 [2] => 3 )
Array ( [0] => A0036 [1] => 9 [2] => 1 )
Array ( [0] => A0037 [1] => 14 , 18 [2] => 2 )
Array ( [0] => A0039 [1] => 8 , 9 , 14 [2] => 3 )
Array ( [0] => A0040 [1] => 18 , 9 [2] => 2 )
Array ( [0] => A0041 [1] => 8 , 6 [2] => 2 )
Array ( [0] => A0042 [1] => 6 [2] => 1 )
Array ( [0] => A0045 [1] => 9 [2] => 1 )
Array ( [0] => A0046 [1] => 4 , 6 [2] => 2 )
Array ( [0] => A0047 [1] => 18 [2] => 1 )
Array ( [0] => A0048 [1] => 14 [2] => 1 )
Array ( [0] => A0049 [1] => 6 , 14 , 8 , 18 [2] => 4 )
Array ( [0] => A0050 [1] => 14 [2] => 1 )
------------------------------------------------------
I am trying to sort column[2] in descending order. I have tried several of the examples here: and have looked through a stack of post at tek-tips and none of theme seem to produce the desired results.
CODE SNIPET
------------------------------------------------------
if (count(array_intersect($selectedno, $numbers)) >= 1) {
$rs = array(($a_row['selectedno']), join(" , ",array_intersect($selectedno, $numbers)), count(array_intersect($selectedno, $numbers)));
echo "<br />";
} else {
$rs = null;
}
print_r ($rs);
------------------------------------------------------
Thanks in advance.
ZeroAnarchy
Experience is a wonderful thing. It enables you to recognize a mistake
when you make it again.
Here is the output via print_r
------------------------------------------------------
Array ( [0] => A0034 [1] => 4 [2] => 1 )
Array ( [0] => A0035 [1] => 18 , 9 , 14 [2] => 3 )
Array ( [0] => A0036 [1] => 9 [2] => 1 )
Array ( [0] => A0037 [1] => 14 , 18 [2] => 2 )
Array ( [0] => A0039 [1] => 8 , 9 , 14 [2] => 3 )
Array ( [0] => A0040 [1] => 18 , 9 [2] => 2 )
Array ( [0] => A0041 [1] => 8 , 6 [2] => 2 )
Array ( [0] => A0042 [1] => 6 [2] => 1 )
Array ( [0] => A0045 [1] => 9 [2] => 1 )
Array ( [0] => A0046 [1] => 4 , 6 [2] => 2 )
Array ( [0] => A0047 [1] => 18 [2] => 1 )
Array ( [0] => A0048 [1] => 14 [2] => 1 )
Array ( [0] => A0049 [1] => 6 , 14 , 8 , 18 [2] => 4 )
Array ( [0] => A0050 [1] => 14 [2] => 1 )
------------------------------------------------------
I am trying to sort column[2] in descending order. I have tried several of the examples here: and have looked through a stack of post at tek-tips and none of theme seem to produce the desired results.
CODE SNIPET
------------------------------------------------------
if (count(array_intersect($selectedno, $numbers)) >= 1) {
$rs = array(($a_row['selectedno']), join(" , ",array_intersect($selectedno, $numbers)), count(array_intersect($selectedno, $numbers)));
echo "<br />";
} else {
$rs = null;
}
print_r ($rs);
------------------------------------------------------
Thanks in advance.
ZeroAnarchy
Experience is a wonderful thing. It enables you to recognize a mistake
when you make it again.