Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. <?php
  2. $questions_wanted = 2000;
  3. $questions_got = 0;
  4. $all_questions = [];
  5. while($questions_got < $questions_wanted){
  6. $questions = Sensei()->lesson->lesson_quiz_questions( get_the_ID() );
  7.  
  8. if( count( $questions ) > 0 ){
  9. foreach($questions as $question):
  10. array_push($all_questions, $question->ID);
  11. $questions_got++;
  12. endforeach;
  13. }
  14. }
  15. ?>
  16. <?php
  17. //$unique_questions = array_unique($all_questions);
  18. $counts = array_count_values($all_questions);
  19. var_dump($counts);
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement