本文整理汇总了PHP中Head::getHeads方法的典型用法代码示例。如果您正苦于以下问题:PHP Head::getHeads方法的具体用法?PHP Head::getHeads怎么用?PHP Head::getHeads使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Head
的用法示例。
在下文中一共展示了Head::getHeads方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Head
$h = new Head();
// add here
} else {
echo 'Please check your entries';
}
} else {
// displaying the list of all catagories and heads
$c = new Catagory();
$h = new Head();
echo '<form method="POST" >Select a Catagory or Head<br><select name="catname">';
foreach ($c->getList() as $cat) {
// name of all catagories from the DB
echo '<option>', $cat['name'], '</option>';
}
echo '</select><br><select name="headname">';
foreach ($h->getHeads('chead') as $head) {
// name of all catagory heads from the DB
echo '<option>', $head['username'], '</option>';
}
// we set a hidden input cathead to rcathead, so that we know we want to assign a catagory to head
echo '</select><br><input type="hidden" name="cathead" value="cathead"/><input type="submit" value="Assign" /></form>';
}
break;
default:
// if none of the above we simply ask to select something
echo "Sorry you selected something that does not exist";
break;
}
echo '</center>';
} else {
echo "Please Select Something from Admin";