本文整理汇总了PHP中_tidy_question函数的典型用法代码示例。如果您正苦于以下问题:PHP _tidy_question函数的具体用法?PHP _tidy_question怎么用?PHP _tidy_question使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了_tidy_question函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_question_options
/**
* Updates the question objects with question type specific
* information by calling {@link get_question_options()}
*
* Can be called either with an array of question objects or with a single
* question object.
*
* @param mixed $questions Either an array of question objects to be updated
* or just a single question object
* @return bool Indicates success or failure.
*/
function get_question_options(&$questions)
{
if (is_array($questions)) {
// deal with an array of questions
foreach ($questions as $i => $notused) {
if (!_tidy_question($questions[$i])) {
return false;
}
}
return true;
} else {
// deal with single question
return _tidy_question($questions);
}
}
示例2: get_question_options
/**
* Updates the question objects with question type specific
* information by calling {@link get_question_options()}
*
* Can be called either with an array of question objects or with a single
* question object.
*
* @param mixed $questions Either an array of question objects to be updated
* or just a single question object
* @param boolean $loadtags load the question tags from the tags table. Optional, default false.
* @return bool Indicates success or failure.
*/
function get_question_options(&$questions, $loadtags = false)
{
if (is_array($questions)) {
// deal with an array of questions
foreach ($questions as $i => $notused) {
_tidy_question($questions[$i], $loadtags);
}
} else {
// deal with single question
_tidy_question($questions, $loadtags);
}
return true;
}