I am trying to display multiple fields in 1 image using imagettftext(), I am retrieving the data from a MySQL database, but I just can't seem to get it to work the way I need it to. I need it to display a different field in a different area of the image.
So far I have tried while and foreach.
while($row = mysql_fetch_assoc($query))
{
$username = $row['PLAYER_NAME'];
}
imagettftext($im, 25, 0, 25, 52, $text_color, $font, $username);
imagettftext($im, 25, 0, 25, 138, $text_color, $font, $username);
imagettftext($im, 25, 0, 25, 229, $text_color, $font, $username);
That currently outputs: Field1 Field1 Field1
On the image.
Instead I would like it to display Field1, Field2 and Field3. Is that possible? If so, just sending me in the right direction would be a huge help.
I have been experimenting with this for about 3 days now, but have had no luck.
Thanks