"; $sql = " select ca_id, ca_name from {$g4['shop_category_table']} where ca_id like '$tmp_ca_id%' and ca_use = '1' and length(ca_id) = $len2 order by ca_id "; $result = sql_query($sql); while ($row=sql_fetch_array($result)) { $style = ""; if ($ca_id == $row['ca_id']) $style = " class='accent' "; if ($cnt) { $str .= ""; $str .= ""; $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)) { if (!$k) $str .= "
· $row[ca_name]|"; $str .= "{$row2['ca_name']}   "; $k++; } //if (!$k) $str .= ""; $str .= "
"; } else { $str .= "{$row['ca_name']}   "; } $exists = true; } if (!$cnt) $str .= ""; } if ($exists) { echo "
$str

"; } ?>