Relevant section of current code:
$xml=simplexml_load_file($file);
$number=$xml->data->value;
imagettftext($image,$size,$angle,$x,$y,$colour,$font,$number);
The goal of this is to display a value stored in an xml file, which currently works as is. However, larger numbers are a bit of an eyesore. I figured number_format would fix this, so I tried:
$xml=simplexml_load_file($file);
$number=$xml->data->value;
imagettftext($image,$size,$angle,$x,$y,$colour,$font,number_format($number));
And:
$xml=simplexml_load_file($file);
$number=number_format($xml->data->value);
imagettftext($image,$size,$angle,$x,$y,$colour,$font,$number);
And:
$xml=simplexml_load_file($file);
$number=$xml->data->value;
$number=number_format($number);
imagettftext($image,$size,$angle,$x,$y,$colour,$font,$number);
In all three cases, no number ends up being displayed on the image I'm trying to generate. Like I said though, this works just fine without number_format. The xml file is structured like so:
<xmldata>
<data>
<value>123456</value>
</data>
</xmldata>