Jeffrey Sambells wrote:
You've got 83px in you XML file for the fontsize. the 'px' is messing
it up change it to just 83 in the XML file or cast the value to (float)
which will extract the 83 and remove the px:
well spotted Jeffery; James didn't I say to var_dump() the vars you
create inside
You've got 83px in you XML file for the fontsize. the 'px' is messing
it up change it to just 83 in the XML file or cast the value to (float)
which will extract the 83 and remove the px:
foreach ($xml->textblock as $text) {
$fontsize=(float)$text->fontsize;
Title: Re: [PHP] PHP Warning: imagettftext() expects parameter 2 to be double
Hi,
Thank you for getting back to me, your the first.
The array works fine – I have tested it using var_dump().
Attached are the two files – xml.test – this holds the array of the text blocks which is being parsed
James wrote:
Hi there,
I have been using the GD functions from PHP5.0 on Mac OS X.
I have a simple script that creates a PNG image with text on the image using
fonts using FreeType 2.
I am trying to use the imagettftext() function within a foreach loop but I
get the following error:
PHP War
Hi there,
I have been using the GD functions from PHP5.0 on Mac OS X.
I have a simple script that creates a PNG image with text on the image using
fonts using FreeType 2.
I am trying to use the imagettftext() function within a foreach loop but I
get the following error:
PHP Warning: imagettf
5 matches
Mail list logo