';
if ($cnt) {
$str .= ''.$row['ca_name'].'';
$sql2 = " select ca_id, ca_name from {$g4['shop_category_table']} where ca_id like '{$row['ca_id']}%' and ca_use = '1' and length(ca_id) = $len4 order by ca_id ";
$result2 = sql_query($sql2);
$k=0;
while ($row2=sql_fetch_array($result2)) {
$str .= ''.$row2['ca_name'].'';
$k++;
}
} else {
$str .= ''.$row['ca_name'].'';
}
$str .= '';
$exists = true;
}
}
if ($exists) {
?>