How to access the published field in my PHP code? I am defining a datatype called slider

$nodes = node_load_multiple(array(), array('type' =&gt; 'slider'));
foreach($nodes as $slider):


and trying to iterate through each of them. I want to access the field which says if the content is publised or not. I tried this -

$slider-&gt;$status == 1


But this is not working.
Does anyone have a solution this problem?

Thanks
It is

$slider-&gt;status == 1


instead of

$slider-&gt;$status == 1