$total = 0;
foreach($model->rels as $rel);
{
$total += $rel->count;
}
echo $total; // wrong result!!
Who in the hell wrote that wicked semicolon? Me?
In the real source, the relation was a little bit complicated, and I wasted time examining it.
Posted 17 March 2013 - 08:46 AM
$total = 0;
foreach($model->rels as $rel);
{
$total += $rel->count;
}
echo $total; // wrong result!!
Posted 18 March 2013 - 06:38 AM
Posted 18 March 2013 - 08:05 AM
Posted 31 March 2013 - 09:53 AM
phpstorm.png (3.45K)
Posted 15 April 2013 - 01:36 AM