I want to pass $data from the controller named poll to the results_view however I am getting an undefined variable error.
$data
poll
results_view
In simple terms,
$data['a'] in controller becomes $a in your view. ($data won't exist in your view, only the index will become available)
e.g.
Controller: $data['hello']='hellow world'; view: echo $hello;