i have three array and all array have relation (like:Date[0] Game[0] Data[0])
Array in index format
DATE | GAME | DATA
17-12-14 | A | 72
17-12-14 | B | 16
17-12-14 | C | 78
18-12-14 | A | 45
18-12-14 | B | 56
18-12-14 | C | 89
Now i want to get result like that
DATE | GAME | DATA
17-12-14 | C | 78
18-12-14 | A | 45
18-12-14 | B | 56
Here my code what i am tried
foreach ($date as $key => $value) {
$dateSet=($dates[$key]);
$gameSet=($games[$key]);
$dataSet=($datas[$key]);
if (($dateSet >= "17-12-14" ) &&($gameSet == "A") && ($gameSet == "B") && ($gameSet == "C")){
echo $dateSet.'-'.$gameSet.'-'.$dataSet."<br />";
}
}
output A blank page :(
thank in advance
Update
if (($dateSet >= "17-12-14" ) &&(($gameSet == "A")||($gameSet == "B")||($gameSet == "C"))){
echo $dateSet.'-'.$gameSet.'-'.$dataSet."<br />";
}
now output is all six rows . but i want only 17-12-14 C row and 18-12-14 A and B rows
17-12-14is presumably Dec 17/2014, which means that31-11-14will test out as LARGER than 17-12-14, because 31 > 17.