Example #1
0
function printGoodsPanelListInTags($tags_begin, $tags_end)
{
    $res = getGoodsFromDB();
    if ($res->num_rows > 0) {
        while ($row = $res->fetch_assoc()) {
            echo $tags_begin . $row["name"] . $tags_end;
        }
    }
}
Example #2
0
function generateGoods()
{
    $result = getGoodsFromDB();
    if ($result->num_rows > 0) {
        printBeginScriptGoods();
        // output data of each row
        while ($row = $result->fetch_assoc()) {
            printGoodsData($row["name"], $row["price"], $row["id"], $row["type"]);
        }
        printEndScript();
    } else {
        echo "0 results";
    }
}