PHP Object Oriented Programming(For Generating Crossword Puzzle)
I'm just a typical programmer and not so familiar with PHP coding and I am working with a crossword Generator/Game as a project in our school. i need help in getting the values of the loop so that i can use them to evaluate/ compare them with user input values. so here's the code

  function getHTML($params = array())
	
    {
	
        extract((array)$params);
        
		$html = "<form method='GET' ><div align='center' style='background-image:url(bg.png);background-repeat:no-repeat;background-position:center'><table border=0 class='crossTable' align='center'>";
        
		for ($y = -1; $y < $this->rows; $y++)
		{
			$html.= "<tr align='center'>";

			for ($x = -1; $x < $this->cols; $x++)
			{				
				$html .= "\n";

				if (isset($this->cells[$x][$y]->number)) {
                    
					//global $maxinum, $totwords, $wc, $fillflag, $cellflag; # sandy addition
					$tempinum = $this->cells[$x][$y]->number; # word puzzle item
					//$tempinum = $tempinum + 10 - $maxinum - $wc;
					//dump($tempinum);
					//$tempinum = $tempinum + 10 - $this->maxinum - $this->totwords;

					$html.= "<td class='cellNumber$cellflag' style='width:20px' align=center valign=bottom><b>$tempinum</b></td>"; # sandy addition
				}
                elseif (isset($this->cells[$x][$y]->letter))
				{
                     $ans="answer".$x.$y;
                    if(isset($_GET['submit'])){                                                                               
                         echo $ans." : ".$_GET[$ans]."=".$this->cells[$x][$y]->letter."<br />";   
                        if((isset($_GET[$ans])===($this->cells[$x][$y]->letter) )&& !empty($_GET[$ans])){
                                  
                                  $letter=$this->cells[$x][$y]->letter;
                                  $html.="<td bgcolor='green' style='width:20px'><input readonly='readonly' style='width:20px' type='text' value='$letter' /></td>";
                            
                            }elseif((isset($_GET[$anS])!== ($this->cells[$x][$y]->letter)) || !empty($_GET[$ans])) {
                               
                                $letter=$_GET[$ans];
                                $html.="<td bgcolor='red' style='width:20px'><input readonly='readonly' style='width:20px' type='text' value='$letter'/></td>";
                                    
                            }elseif((isset($_GET[$ans]) !== $this->cells[$x][$y]->letter) && empty($_GET[$ans])){
                               
                                $letter=$_GET[$ans];
                                $html.="<td bgcolor='blue' style='width:20px'><input readonly='readonly' style='width:20px' type='text' value='$letter' /></td>"; 
                            } 
                            
                    }else{
                    
                    
                    $html.= "<td bgcolor='black'  style='width:20px' class='{$class}$cellflag'><input type='text' name='{$ans}' style='text-align:center;width:20px;background-color:#FAFAD2;border:none;font-weight:bold' maxlength='1'/></td>";
                    }
                }
				else
				$html.= "<td  style='width:20px' class='{$class}$cellflag'>&nbsp;</td>";
			}
			$html.= "</tr>";
		}
		$html.= "</table><input type='submit' name='submit' value='show'></div></form>";
        return $html; 
        } 
PHP Object Oriented Programming(For Generating Crossword Puzzle)
===

I'm just a typical programmer and not so familiar with PHP coding and I am working with a crossword Generator/Game as a project in our school. i need help in getting the values of the loop so that i can use them to evaluate/ compare them with user input values. so here's the code

  function getHTML($params = array())
	
    {
	
        extract((array)$params);
        
		$html = "<form method='GET' ><div align='center' style='background-image:url(bg.png);background-repeat:no-repeat;background-position:center'><table border=0 class='crossTable' align='center'>";
        
		for ($y = -1; $y < $this->rows; $y++)
		{
			$html.= "<tr align='center'>";

			for ($x = -1; $x < $this->cols; $x++)
			{				
				$html .= "\n";

				if (isset($this->cells[$x][$y]->number)) {
                    
					//global $maxinum, $totwords, $wc, $fillflag, $cellflag; # sandy addition
					$tempinum = $this->cells[$x][$y]->number; # word puzzle item
					//$tempinum = $tempinum + 10 - $maxinum - $wc;
					//dump($tempinum);
					//$tempinum = $tempinum + 10 - $this->maxinum - $this->totwords;

					$html.= "<td class='cellNumber$cellflag' style='width:20px' align=center valign=bottom><b>$tempinum</b></td>"; # sandy addition
				}
                elseif (isset($this->cells[$x][$y]->letter))
				{
                     $ans="answer".$x.$y;
                    if(isset($_GET['submit'])){                                                                               
                         echo $ans." : ".$_GET[$ans]."=".$this->cells[$x][$y]->letter."<br />";   
                        if((isset($_GET[$ans])===($this->cells[$x][$y]->letter) )&& !empty($_GET[$ans])){
                                  
                                  $letter=$this->cells[$x][$y]->letter;
                                  $html.="<td bgcolor='green' style='width:20px'><input readonly='readonly' style='width:20px' type='text' value='$letter' /></td>";
                            
                            }elseif((isset($_GET[$anS])!== ($this->cells[$x][$y]->letter)) || !empty($_GET[$ans])) {
                               
                                $letter=$_GET[$ans];
                                $html.="<td bgcolor='red' style='width:20px'><input readonly='readonly' style='width:20px' type='text' value='$letter'/></td>";
                                    
                            }elseif((isset($_GET[$ans]) !== $this->cells[$x][$y]->letter) && empty($_GET[$ans])){
                               
                                $letter=$_GET[$ans];
                                $html.="<td bgcolor='blue' style='width:20px'><input readonly='readonly' style='width:20px' type='text' value='$letter' /></td>"; 
                            } 
                            
                    }else{
                    
                    
                    $html.= "<td bgcolor='black'  style='width:20px' class='{$class}$cellflag'><input type='text' name='{$ans}' style='text-align:center;width:20px;background-color:#FAFAD2;border:none;font-weight:bold' maxlength='1'/></td>";
                    }
                }
				else
				$html.= "<td  style='width:20px' class='{$class}$cellflag'>&nbsp;</td>";
			}
			$html.= "</tr>";
		}
		$html.= "</table><input type='submit' name='submit' value='show'></div></form>";
        return $html; 
        } 