<?php
 if ($servicesList and $R['clientServicesSelectAll']==1) { foreach($servicesList as $idService=>$thisServ) { if (!$thisServ['idBalance']) { $S['manualBalance']['idServices'][$idService]=true; } } } if ($servicesList and $R['clientServicesSelectAll']==-1) { foreach($servicesList as $idService=>$thisServ) { if (!$thisServ['idBalance']) { unset($S['manualBalance']['idServices'][$idService]); } } } 