I'm new in joomla, My code is much like this

//on controller
function listing()
            JRequest::setVar( 'view', 'hello' );
            JRequest::setVar('hidemainmenu', 0);
//on view.html.php 

i wish to fetch this 'hidemainmenu' How do i fetch can anybody help??

When the code above is your view.html.php file you'll be able to pass the variable right through to your template file using a line like so:

$this->assignRef( 'hidemainmenu', $hidemainmenu);

Then inside your tmpl/default.php file for instance you have access to this variable like so: