str=array(); $this->type=1; } public function setType($t) { $this->type =$t; } public function getType() { return $this->type; } public function setStr($s) { //echo $s[0]."oxox"; $this->str = $s; if(count($this->str)>1) $this->type = 1; else $this->type = 2; } /*public function createOptions() { $options = $op; }*/ public function getNumOfOptions() { return count($this->str); } public function getIndexOption($i) { $var = $this->str[$i]; //echo "$var lol$i"; return $var; } } function modify_array($ar) { $i = 1; $newAry=array(); echo $ar; $temp = explode("<#",$ar); //$list = array(); while (count($temp) > $i) { $temp1 = explode("#>",$temp[$i]); $temp2 = explode("/",$temp1[0]); $newSelc = new Selections(); $newSelc->setStr($temp2); //echo $temp2[0]; array_push($newAry,$newSelc); //$newAry[$i]=&$newSelc; //$ss = $newSelc->getIndexOption(0); $i++; } return $newAry; } echo "