note 16574 added to features.images
| From: | drensink at yahoo dot com | Date: | Sun, 04 Nov 2001 21:21:38 +0000 |
| Subject: | note 16574 added to features.images | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-20431@lists.php.net to get a copy of this message | ||
Using implode on $argv passes spaces as %20 instead of " ". If you want spaces in the text
you can use the following.
<img src="button1.php?text with spaces" border="0" alt="text with
spaces">
<?php
Header("Content-type: image/png");
$string=implode($argv," ");
$string=str_replace("%20", " ", $string);
$im = imageCreateFromPng("image/button1.png");
$orange = ImageColorAllocate($im, 220, 210, 60);
$px = (imagesx($im)-7.5*strlen($string))/2;
ImageString($im,3,$px,9,$string,$orange);
ImagePng($im);
ImageDestroy($im);
?>
--
http://www.php.net/manual/en/features.images.php
http://master.php.net/manage/user-notes.php?action=edit+16574
http://master.php.net/manage/user-notes.php?action=delete+16574
http://master.php.net/manage/user-notes.php?action=reject+16574