tags:

views:

22

answers:

2

Is there anyway to create an image outof mysql result set in PHP using GD library? I am ucrrently displaying the resultset in a table format in my php page.

+1  A: 

You could try and convert your HTML generated result data as a pdf using TCPDF (it does have some basic HTML support). AFAIK there's no library that renders HTML and converts to an image at the same time.

If you HAVE to have an image instead, consider using GDs built in methods to render your data ... though this might be a PITA.

Good luck.

aefxx
Agreed, GC Library would be nice to render data in (if done correctly).
Neurofluxation
Actually, weak GD with it's few formats supported is worst choice :)take a look to imagemagick
Col. Shrapnel
GD may be worse but it's available with even the crappiest hosts.
aefxx
thanks for your comments
JPro
A: 

No, there is no way while displaying current resultset. Basic HTML knowledge is needed to use PHP.

Storing images in the disk directory instead of database is much ease to use and more reliable

Col. Shrapnel
I think you didn't understand the OP's question. He wants to generate an image out of a database result set.
aefxx
Ah, may be. Well, not GD nor any other graphic library would helpBecause it's an HTML render engine what does he need in this case.
Col. Shrapnel