<?php $cookie = '101(2)_102(3)_103(5)'; preg_match_all('/\((\d+)\)/', $cookie, $matches); [, $counts] = $matches; echo 'Total IDs: ', count($counts), ', total count: ', array_sum($counts);
You have javascript disabled. You will not be able to edit any code.