I have the following code:
Code:
function calculateRanking()
{
$created = $this->getCreated();
$diff = $this->getTimeDifference($created, date('F d, Y h:i:s A'));
$time = $diff['days'] * 24;
$time += $diff['hours'];
$time += ($diff['minutes'] / 60);
$time += (($diff['seconds'] / 60)/60);
$base = $time + 2;
$this->ranking = ($this->points - 1) / pow($base, 1.5);
$this->save();
}
The thing I do not understand is why in the $time there are += instead of just = ?
Also if someone can point me to where I can search for this dumb things, since I could find it on php.net with the firefox search.
Thanks a lot.