update page now

Voting

: min(two, two)?
(Example: nine)

The Note You're Voting On

pisu at estmail dot hu
20 years ago
chess board
<?php

$kep = imagecreate(400,400);
$fekete = imagecolorallocate($kep,0,0,0);
$feher = imagecolorallocate($kep,255,255,255);

//imagefill($kep,50,50,$fekete);
imagefill($kep,50,20,$feher);

for ($i=1;$i<8;$i++)  {
  $k = $i*50;
  imageline($kep,0,$k,400,$k,$fekete);
  imageline($kep,$k,0,$k,400,$fekete);
  }

for ($i=0;$i<8;$i++)  {
  for ($j=0;$j<8;$j++)  {
    $x = $i*50 + 2;
        $y = $j*50 + 2;
    if (  ( ($i % 2) + ($j % 2) )  % 2 == 0 )  {
          imagefill($kep,$x,$y,$fekete);
          }

    }
  }

// imagecolortransparent($kek,$piros);

header('content-type : image/png');
imagepng($kep);

?>

<< Back to user notes page

To Top