Arr); } public function CreateClassName(&$TableId, &$TableColId, $Type) { return 'JQC'.$Type.'_'.$TableId.'_'.$TableColId; } public function IsFieldPresent($name) { return (!empty($name) and isset($this->Arr) and isset($this->Arr[$name])); } private function ConstructOptions(&$name, &$Id, $SetValue) { if (!empty($Id)){ if(isset($this->Arr[$name][1])){ $this->Arr[$name][1] .= $SetValue; #BUG HEAR OK-$this->Arr[$name][1] = $this->Arr[$name][1].$SetValue; }else{ $this->Arr[$name][1] = $SetValue; } } } public function AddValueJQuery($EditMode, $TableId, $TableColId, $Type, $Id = '', $Value = '', $IsEnd = true) { if (!empty($EditMode)) return ''; $ClassName = $this->CreateClassName($TableId, $TableColId, $Type); if ($this->IsFieldPresent($ClassName)){ $this->ConstructOptions($ClassName, $Id, ","); }else{ $this->Arr[$ClassName][0] = $Type; $this->ConstructOptions($ClassName, $Id, "options:{"); $this->Arr[$ClassName][2] = $ClassName; } $this->ConstructOptions($ClassName, $Id, '"'.$Id.'" : "'.$Value.'"'); return 'class="'.$ClassName.'" '; } } session_start(); $FScriptsArr = new svScripts(); for ($i = 1; $i <= 10000; $i++) { $Data_ClassName = $FScriptsArr->AddValueJQuery('', 10, 11, 'select', '1', 'Thom', false); } ?>