Which of the following will save a custom session variable in Magento?

  • $_SESSION[‘name’] = ‘frontend’;

  • $session = Mage::getSingleton(“core/session”, array(“name”=>”frontend”));
    $session->setData(“device_id”, 4);

  • Mage::getSingleton( ‘customer/session’ )->setValue( ‘name’, array( 1, 2, 3 ) );

  • None of the above

stackoverflow.com/questions/3340982