0
 <?php
            for ($i = 0; $i <= 8; $i++){
                print('< div class="grid-item" >');
                printf(' <input type = "text" name = "box%s" value = "%s" >', $i, $box[$i]);
                print('</div>'); // this is line 82
                if ($i == 2 || $i == 5 || $ == 8){
                    print('<br>'); 
                }
            }
            if($winner == 'TIE'){
                print('<input type = "submit" name = "next" value = "VALIDATE">');
            }
            else{
                print('<input type = "button" name = "anothergame" value = "Play Again" onclick = "window.location.href=\'index.php\'">');
            }
        ?> 

CODE SNIPPET

I have tried multiple fix, but none of them really worked.

The same error occur even if the code block is commented out, which makes the issue even more complex.

I am assuming that the "<" refers to a tag not a comparison operator. Otherwise it would have given me the error on the line where the comparison occur.

Is there any syntax error you guys can see?

  • 1
    There was only one error: https://nimb.ws/dZOl1g and it went away when `$` was replaced with `$i`: https://nimb.ws/hG1CML – m4n0 Jul 06 '21 at 18:10

0 Answers0