I meant that part:
$grid_array = grid_array();
if ($grid_array) {
foreach ($grid_array as $value) {
$value = explode('|',$value);
switch ($value[5]) {
case 'P':
$used_block = imagecreatefromgif($cfg['upload_path'].$value[4]);
imagecopyresampled($grid,$used_block,$value[0],$value[1],0,0,$value[2],$value[3],$value[2],$value[3]);
break;
}
}
}
Add the following lines on top of the script:
error_reporting(E_ALL);
ini_set('display_errors','On');
and check if you get any warnings or errors. Please post the code that declares the function grid_array().