Percentage Complete Calculations in PHP

Aspose.Tasks - Percentage Complete Calculations

To get Complete Percentage Calculations using Aspose.Tasks Java for PHP, simply invoke TasksPercentage module. Here you can see example code.

PHP Code

 1$project = new Project('test_tasks.mpp');
 2$collector = new ChildTasksCollector();
 3$taskUtils = new TaskUtils();
 4$taskUtils->apply($project->getRootTask(), $collector, 0);
 5$tsk = new Tsk();
 6$tasks = $collector->getTasks();
 7$i = 0;
 8while ($i < sizeof($tasks)) {
 9    $task = $tasks -> get($i);
10    print (string)$task -> get($tsk -> PERCENT_COMPLETE);
11    print (string)$task -> get($tsk -> PERCENT_WORK_COMPLETE);
12    print (string)$task -> get($tsk -> PHYSICAL_PERCENT_COMPLETE);
13    $i += 1;
14}

Download Running Code

Download Percentage Complete Calculations (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.