Hi,
I have the following:
<?php
$result = mysql_query("SELECT `category_id` FROM `categories` WHERE `category_parent_id` = '80'");
while ($row = mysql_fetch_array($result)){
$childrows [] = $row['category_id'];
$clean = array_unique($childrows);
$category_string = implode(",",$clean);
echo $category_string;
?>
And this outputs:
4747,4847,48,6347,48,63,6447,48,63,64,6847,48,63,64,68,69
I cannot work out why I have the duplicates and some have the comma's missing.
Please help!