Trying to add a gif image to $table->data[] for print_table()

Trying to add a gif image to $table->data[] for print_table()

by Brian Jones -
Number of replies: 0
Hi all,

I'm trying to populate my $table object, which is then fed to print_table, which seems to do a nice job, and saves me a lot of messy HTML coding (thanks for that).

I'm probably lacking in cleverness here, but I haven't figured out how to put an array of images into my table's data[] array. Each row in my table will have a status image (it'll be one of two images), but the best I've got so far is I got the field in the table populated with the *path* to the image. Not what I wanted.

I'm looking for examples in the moodle code of a print_table that is fed a table that has images, but haven't found one yet.

If anyone knows where I can find one, or has a simple example of how to get the image to appear, I'd really appreciate it!

thanks,
brian.
Average of ratings: -