castis's solution works
however if you want to do this on a more finely grained level you can use:
//in your controller$data['whatever'] = 'someValue';
.
//In your viewecho $whatever //outputs 'someValue';//pass $whatever on$this->load->view('some/view', Array('whatever' => $whatever));