Currency Properties in PHP

Aspose.Tasks - Reading Currency Properties

To read Currency Properties using Aspose.Tasks Java for PHP, call get_currency_properties method of CurrencyProperties module. Here you can see example code.

PHP Code

1$project = new Project('test_tasks.mpp');
2$prj = new Prj();
3print "Currency Code : " . (string)$project->get($prj->CURRENCY_CODE);
4print "\nCurrency Digits : " . (string)$project->get($prj->CURRENCY_DIGITS);
5print "\nCurrency Symbol : " . (string)$project->get($prj->CURRENCY_SYMBOL);
6print "\nCurrency Symbol Position: ". (string)$project->get($prj->CURRENCY_SYMBOL_POSITION);

Aspose.Tasks - Writing Currency Properties

To write Currency Properties using Aspose.Tasks Java for PHP, call set_currency_properties method of CurrencyProperties module. Here you can see example code.

PHP Code

 1$project = new Project();
 2$prj = new Prj();
 3$currencySymbolPositionType = new CurrencySymbolPositionType();
 4$project->set($prj->CURRENCY_CODE, "AUD");
 5$project->set($prj->CURRENCY_DIGITS, 2);
 6$project->set($prj->CURRENCY_SYMBOL, "$");
 7$project->set($prj->CURRENCY_SYMBOL_POSITION, $currencySymbolPositionType->After);
 8$saveFileFormat = new SaveFileFormat();
 9$project->save("currency_properties.xml", $saveFileFormat->XML);
10print "Set currency properties, please check the output file.";

Download Running Code

Download Currency Properties (Aspose.Tasks) from any of the below mentioned social coding sites:

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.