Well I'm trying to write a text in a image and I have this:
header("Content-type: image/png");
$font = 4;
$width = ImageFontWidth($font) * strlen($string);
$height = ImageFontHeight($font);
$im = @imagecreate($width,$height);
$background_color = imagecolorallocatealpha($im, 255, 255, 255, 127);
$text_color = imagecolorallocate($im, 0, 0,0);
imagestring($im, $font, 0, 0, utf8_decode($string), $text_color);
imagepng($im);
imagedestroy($im);
And the string:
$string = "Hello, My name is Ikillnukes and I'm trying to do a newline with PHP.";
Well I want to do this with the output:
Normal output: Hello, My name is Ikillnukes and I'm trying to do a newline with PHP.
That I want:
Hello, My name is Ikillnukes and
I'm trying to do a newline with PHP.
How can I do this?
And one more thing... I want to add some bold text to the string how can I do this?