# \[PHP\] imagestring size?

**URL:** <https://forum.kirupa.com/t/php-imagestring-size/212257>\
**Category:** programming\
**Created:** [January 9, 2007, 6:29pm UTC](https://forum.kirupa.com/t/php-imagestring-size/212257 "2007-01-09T18:29:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![evildrummer](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/evildrummer/32/2308_2.png) [@evildrummer](https://forum.kirupa.com/u/evildrummer)\
**Post date:** [January 9, 2007, 6:29pm UTC](https://forum.kirupa.com/t/php-imagestring-size/212257/1 "2007-01-09T18:29:23Z")

</div>

I am using PHP to create dynamic images, and I have done it all before but I have lost my old code and cant remember how to change the size of the text, my code is like this:

```php

<?php
header("Content-type: image/png");
$post = "example"
$image = imagecreate(300, 60);
$black = imageColorAllocate($image, 80, 139, 197);
$text = imageColorAllocate($image, 255, 255, 255);
imagestring($image, 1, 5, 5, $post, $text);
imagepng($image);
imagedestroy($image);
?>

```

any help?
