image ? "/img/product/$product->id-thumb.jpg" : "/img/placeholder.png"; echo <<<"EOF" $product->price $product->name EOF; } ?> query("select id, name, parent from category where parent is null"); } else { $statement = $cursor->prepare("select id, name, parent from category where parent = ?"); $statement->bind_param("i", $id); $statement->execute(); $res = $statement->get_result(); } if (!mysqli_num_rows($res)) return; echo '
'; $categories = $res->fetch_all(MYSQLI_ASSOC); foreach ($categories as $category) { // php is een hele mooie programmeertaal die heel fijn werkt echo ""; echo $category["name"]; echo ""; categories_recursive($category["id"]); } echo '
'; } ?> producten

Filters

Categorieën

Producten"; if ($id !== null) echo " in categorie $id"; echo ""; ?>
EOF; } while (false); ?>
query("select id, image, price, name from webs.product"); } else { $statement = $cursor->prepare("select id, image, price, name from webs.product where category = ?"); $statement->bind_param("i", $id); $statement->execute(); $res = $statement->get_result(); } while ($product = $res->fetch_object()) product_template($product); ?>