Quote:
Originally Posted by StupidRalph
PHP Code:
$query = "SELECT * FROM table";
$result = mysql_query($query);
$code_array = array();
while($rows = mysql_fetch_array($result)){
$code=$rows['code'];
$pt=$rows['points'];
$code_array[] = $code;
foreach($code_array as $key => $value) {
echo $key. " " . $value . "<br>";
}
}
Try this instead...I have not tested it...
|
thanks. it works this time but the output looks weird
PHP Code:
0 Code1
0 Code1
1 Code2
2 Code3
3 Code4
0 Code5
0 Code5
How? Actually I want to do sorting. I want to get the duplicate values to do some comparison. Do you know how?