我有一个插件,可以让我一个接一个地显示问题, 但我需要它显示3的问题3。
$questions = $this->test->buildQuestions();
$answered = $this->answeredQuestions->count();
foreach ($questions as $q => $question) {
$records = fRecordSet::buildFromArray('WpTesting_Model_Question', array($q => $question));
$isCurrent = ($answered == $q);
$this->addStep(new WpTesting_Model_Step('', $records), $isCurrent);
}
return $this->enableStepsCounter();
如何使此代码打印3个问题而不是1个问题?
谢谢