本文整理汇总了PHP中categories::categories方法的典型用法代码示例。如果您正苦于以下问题:PHP categories::categories方法的具体用法?PHP categories::categories怎么用?PHP categories::categories使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类categories
的用法示例。
在下文中一共展示了categories::categories方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: categories
<?php
include 'categories.php';
$categs = new categories();
$array = $categs->categories(NULL);
echo "<table>";
echo "<tr>";
echo "<td>" . "ID" . "</td>";
echo "<td>" . "Name" . "</td>";
echo "</tr>";
foreach ($array as $key => $categories) {
echo "<tr>";
echo "<td>" . $categories['id'] . "</td>";
echo "<td>" . $categories['name'] . "</td>";
echo "</tr>";
}
echo "</table>";
示例2: categories
<li class="color10"><a class="color3" href="home.php">Sale</a></li>
<li class="color10"><a class="color3" href="contact.php">Contact Us</a></li>
<div class="clearfix"> </div>
</ul>
</div>
<div class="clearfix"> </div>
</div>
</div>
</div>
<div class="men">
<div class="container">
<div class="col-md-4 sidebar_men">
<h3>Categories</h3>
<?php
$categs = new categories();
$array = $categs->categories(NULL);
foreach ($array as $key => $categories) {
@($subs = $categs->categories($categories['id']));
?>
<ul class="product-categories color">
<h3><?php
echo $categories['name'];
?>
</h3>
<?php
foreach ($subs as $key => $subs) {
?>
<li class="cat-item cat-item-60"><a href="men.php?cat_id=<?php
echo $subs['id'];
?>
示例3: categories
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div class="btn-group btn-group-lg ">
<a href="insertCategory.php"><input type="button" class="btn btn-primary " value="Insert Categories"></a>
<a href="insertSubCategory.php"><input type="button" class="btn btn-primary " value="Insert SubCategories"></a>
<a href="productNames.php"><input type="button" class="btn btn-primary " value="Insert Products"></a>
</div>
<div class="panel panel-primary text-center no-boder bg-color-blue input-md">
<form action="productNames.php" id="main" method="post" role="form" class=" form-inline">
<div class="form-group">
<label for="categories">ChooseCategory:</label>
<select name="categories" class="form-control">
<?php
$categs = new categories();
$array = @$categs->categories(NULL);
foreach ($array as $key => $categories) {
?>
<option value=<?php
echo $categories['id'];
?>
><?php
echo $categories['name'];
?>
</option>
<?php
}
?>
</select>