anyone can solve my problem
i have table like this
+tbl_menu
-menu_id
-menu_name (news | tips | reviews)
...................
+tbl_sub_menu
-sub_id
-menu_id
-sub_name (phone, tablet, laptop.......)
...............
i mean if i code in html it look like this
<ul>
<li>News</li>
<li>
<ul>
<li>phone</li>
<li>teble</li>
<li>labtop</li>
</ul>
</li>
<li>Tips</li>
<li>
<ul>
<li>phone</li>
<li>teble</li>
<li>labtop</li>
</ul>
</li>
</ul>
PHP Code:
$field "`tbl_menu`.`menu_name` , `tbl_sub_menu`.`sub_name`";
$table "`tbl_menu` ,`tbl_sub_menu` WHERE `tbl_sub_menu`.`menu_id`= `tbl_menu`.`menu_id`";
$statement=selecttest($field,$table);
 while (
$row $statement->fetch(PDO::FETCH_ASSOC)) {
     echo 
$row['menu_name']."|".$row['sub_name']."<br />";
 }
echo 
"<hr>";
$row $statement->fetchAll(PDO::FETCH_ASSOC);
$a array_unique($row);
echo 
"<pre>";
print_r($a);
echo 
"<hr><br />";
var_dump($a); 
i want to use array_unique() because the database it duplicated result so any way to solve this problem.
Regards,
Heng