Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $polls = $this->requestAction('/polls/activePoll');
- $answers = array();
- foreach($polls['Answer'] as $key => $value){
- $answers[$value['id']] = $value['answer'];
- }
- $responses = array();
- foreach($polls['Response'] as $key => $value){
- $responses[$value['answer_id']] = $responses[$value['answer_id']]+1; //cant set and write at the same time?
- if($value['user_id'] == $session->read('Auth.User.id')){
- $voted = true;
- }
- }
- if($voted): ?>
- ===
- Notice (8): Undefined index: 2 [APP\views\elements\poll.ctp, line 12]
- Notice (8): Undefined index: 1 [APP\views\elements\poll.ctp, line 12]
Add Comment
Please, Sign In to add comment