I want to display a multiple records from the database, 1 of the field needs to be displayed in a list format.
i have managed to achieve this, the problem is that the list is duplicating and incrementing into the next record.
Displays like this:
Record 1: a, b
Record 2: a, b, c, d
Record 3: a, b, c, d, e, f
the record actual contains in the database and should display:
Record 1: a, b
Record 2: c, d
Record 3: e, f
while($row = mysql_fetch_array($query)){
$hf_id = $row["hf_id"];
$title = $row["title"];
$points = explode(",", $row["points"]);
foreach($points as $item) {
$list .= "<li>$item</li>";
}
}
Thanks in Advance