i am trying to create image with PHP and GD library
when i wrote this code no error found
<?php
header("Content-Type: image/png");
$im = @imagecreate(120,120) or die("Cannot Initialize new GD image stream");
for ($i =0; $i<120; $i++) {
for ($j = 0; $j<120; $j++) {
$color = imagecolorallocate($im,rand(0,255),rand(0,255),rand(0,255));
imagesetpixel($im, $i,$j,$color);
}
}
imagepng($im);
imagedestroy($im2);
?>
but i need to set random color for each different pixel ,but i dont know why loop stop in 15 when i set width and height for 120px
what is the problem?
