Böyle bir konum olarak kurulu verileri işlemek için mysql almak için çalışıyor ve yönetim kurulu kurulu siyah ve kırmızı parçaları görüntülemek sahip olmuştur
tahta gibi değerlere sahip
row 8 to 1 and columns A to H
bu yüzden daha sonra yönetim kurulu arasındaki taşımak için mysql kullanabilirsiniz
Question : How do i convert that array into mysql so it can have the board row and column data then give values to the rows and columns so i can display the pieces and use those values to move the pieces in the board
function displayboard(){
$Board = array
(
array(0,0,0,0,0,0,0,0),
array(0,0,0,0,0,0,0,0),
array(0,0,0,0,0,0,0,0),
array(0,0,0,0,0,0,0,0),
array(0,0,0,0,0,0,0,0),
array(0,0,0,0,0,0,0,0),
array(0,0,0,0,0,0,0,0),
array(0,0,0,0,0,0,0,0),
);
$row = 0;
print "<form>";
print "<table border = 1>";
while ($row < 8){ // Counts to 8. (from 0...7 = 8 times. 0 ... 8 = 9 times)
print "<tr>";
$row++;
$col = 0; // reset column to 0 each time printing one row.
while ($col < 8){
print "<td>";
if($Board[$row][$col] == 0)
{
print "<input type=\"checkbox\" name=\"box[]\" value=\"$value\">";
// Add \ before " otherwise it will treat as the end of the quote.
}
print "</td>";
$col++;
}
print "</tr>";
}
print "</table>";
print "</form>";
}