Question: What is the autocummit and SetTransObject() in powerbuilder is there any relation between them, why sql server is non autocummit mode and oracle is in autocummit mode, how the values for autocummit is processed.
What is the function of SetTransObject(); 

TIA :)

Answer: 
```
$startDate = '2016-11-03';
$numberofdays = 45;

$d = new DateTime( $startDate );
$t = $d->getTimestamp();

// loop for X days
for($i=0; $i<$numberofdays; $i++){

    // add 1 day to timestamp
    $addDay = 86400;

    // get what day it is next day
    $nextDay = date('w', ($t+$addDay));

    // if it's Saturday or Sunday get $i-1
    if($nextDay == 0 || $nextDay == 6) {
        $i--;
    }

    // modify timestamp, add 1 day
    $t = $t+$addDay;
}

$d->setTimestamp($t);

echo $d->format( 'Y-m-d' ). "\n";

```

**DEMO** <http://phpio.net/s/azq>
Another shortest way to do this:

```
$businessdays = date('Y-m-d', strtotime($value['invesdate'] . ' +45 weekdays'));
echo $businessdays;

```

There are many predefined references given in PHP documentation [here](http://www.php.net/manual/en/datetime.formats.relative.php).