if i do
var_dump( $poll->vote_form() );
class method returns an array which is what i want
array (size=3)
'id' => int 41
'name' => string 'sg' (length=2)
'options' =>
array (size=4)
116 => string 'dsg' (length=3)
117 => string 'dsg' (length=3)
118 => string 'dg' (length=2)
119 => string 'gd' (length=2)
but when i do
echo $poll->vote_form['name'];
i get error
Undefined property: poll::$vote_form
hm what seems to be the problem? this is the method of class poll
public function vote_form()
{
...
$form = array('id' => $poll_id, 'name' => $poll_name, 'options' => $poll_options);
return $form;
}