1 Attachment(s)
having problems creating columns in PHP and CSS
Hi,
Hope someone can guide me here. Using PHP and CSS to format dynamic columns. PHP extracts the data correctly into HTML, but cannot get CSS to format the Columns correctly, See uploaded jpg file. The following is the PHP code:
Thanks for your help
Mandy
Code:
function key_navigation ($products_array, $cpd_array) {
$product_set = find_all_products(false);
$output = "<table width='100%'> ";
while($product = mysqli_fetch_assoc($product_set)) {
if ($products_array && $product["p_id"] == $products_array["p_id"]) {
}
$num = $product["p_id"];
$i = 0;
$output .= "<th bgcolor=\"#993366\" valign=\"middle\" width=\"10%\"> <a href=\"edit_product.php?p_id=";
$output .= urlencode($product["p_id"]);
$output .= "\">" ;
$output .= htmlentities($product["p_desc"]);
$output .= "</a>";
$cpd_set = find_page_for_cpd ($product["p_id"]);
$output .= "</th>";
//$output .= "<tr> </tr>";
while($cpd = mysqli_fetch_assoc($cpd_set)) {
if ($cpd_array && $cpd["cpd_id"] == $cpd_array["cpd_id"]) {
}
//$output .= "<tr>";
$output .= "<td align='center'>";
$output .= "\"<a href=\"edit_cpd.php?cpd_id=";
$output .= urlencode($cpd["cpd_id"]);
$output .= "\">";
$output .= htmlentities($cpd["cpd_title"]);
$output .= "</td>";
}
}
mysqli_free_result($product_set);
$output .= "</table>";
return $output;
}