У меня есть этот массив.
array (size=5)
0 =>
object(stdClass)[37]
public 'options' => string 'test 1' (length=6)
public 'answer_check' => string 'false' (length=5)
public 'justify_answer' => string 'test 1' (length=6)
public 'score' => string '0' (length=1)
public 'admin_id' => string '3' (length=1)
public 'approved' => string 'approve' (length=7)
1 =>
object(stdClass)[38]
public 'options' => string 'test 1' (length=6)
public 'answer_check' => string 'true' (length=4)
public 'justify_answer' => string 'test 2' (length=6)
public 'score' => string '0' (length=1)
public 'admin_id' => string '3' (length=1)
public 'approved' => string 'approve' (length=7)
2 =>
object(stdClass)[39]
public 'options' => string 'test 3' (length=6)
public 'answer_check' => string 'true' (length=4)
public 'justify_answer' => string 'test 3' (length=6)
public 'score' => string '0' (length=1)
public 'admin_id' => string '3' (length=1)
public 'approved' => string 'approve' (length=7)
Что я хочу сделать, это
Сколько раз answer_check = "true"
Без использования петель.
Есть ли способ к этому?