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 "Select WordPlease select a story first
click here to go back to Story Selection"; } else { $file_name = "stories//".$story_file; $fh = fopen($file_name,'r'); $fr = fread($fh,filesize($file_name)); $newAry = modify_array($fr); echo "
"; echo "

Select your words

"; echo "

"; echo "

Please fill out the form and hit submit

"; echo "
"; echo ""; for($i=0;$i< count($newAry); $i++) { $x = $i+1; echo ""; echo ""; echo ""; echo ""; echo ""; } else { $j = $obj->getNumOfOptions(); $op = $obj->getIndexOption(0); echo "

"; for($k=1;$k<$j;$k++) { echo "/".$inp->getIndexOption($k); } echo ""; echo "

"; echo ""; } } echo ""; echo ""; echo ""; echo "
($x)"; $obj = $newAry[$i]; //echo $obj->getType(); if($obj->getType() == 1) { $inp = $obj->getIndexOption(0); echo "

$inp

"; for($k=0;$k<$j;$k++) { $x = $k+1; $op = $inp->getIndexOption($k); //displaying the radio buttons echo "$op"; } echo "
"; echo "
"; echo ""; echo ""; echo "
"; echo "
"; } ?>