[supersaibal]
Originariamente inviato da }gu|do[z]{®©
ho lo stesso problema..
con le lettere accentate fa casino...

[/supersaibal]
codice:
// create a 100*30 image
$im = imagecreate(100, 30);
// white background and blue text
$bg = imagecolorallocate($im, 255, 255, 255);
$textcolor = imagecolorallocate($im, 0, 0, 255);
// write the string at the top left
$pattern=array('/à/','/è/','/ì/','/ò/','/ù/');
$replace=array('á','é','í','ó','ú');
$stringa= 'ciao papà';
$stringa = preg_replace($pattern, $replace, $stringa);
imagestring($im, 5, 0, 0, $stringa, $textcolor);
// output the image
header("Content-type: image/jpg");
imagejpeg($im);