- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
if (in_array($id, $_SESSION['id']))
{
for ($j = 0; $j < count($_SESSION['id']); $j++)
{
if ($_SESSION['id'][$j] == $id)
{ $num_el = $j;}
}
$_SESSION['count'][$num_el] += $count;
$_SESSION['summa'][$num_el] += $cost*1*$count;
$_SESSION['summa_all'] += $cost*1*$count;
$_SESSION['count_all'] += $count;
}
else
{
$_SESSION['id'][] = $id;
$_SESSION['count'][] = $count;
$_SESSION['summa'][] = $cost*1*$count;
$_SESSION['summa_all'] += $cost*1*$count;
$_SESSION['count_all'] += $count;
}