How to get config variable value in magento.?
To get the config variable value in Magento you must use the below code to get the desired results accordingly.
$configValue = Mage::getStoreConfig('sectionName/groupName/fieldName');
$configValue = Mage::getStoreConfig('sectionName/groupName/fieldName', Mage::app()->getStore());
Above both methods work fine and automatically fetch the config value of the current viewed store.
Here sectionName, groupName and fieldName are present in etc/system.xml file of your module. You can also set this config values in modules config.xml file as per the requirements.