set_col_img()

  • Parameter(s):
    • $col_name: Colume name
    • $base_path: Optional. Base path to image
  • Description:
    • Display as image for a data field in data grid. The 2nd parameter specifies the base path to the image file.
  • Example:

Assuming the productImag value is “abc.jpg“,

The image file ‘abc.jpg’ is stored under ‘path-to-images’ folder on web server.

So the direct full URL to the image would be something like this

1
https://www.example.com/path-to-images/abc.jpg

The following will render a img tag similar to <img src=”/path-to-images/abc.jpg”>. The 2nd parameter “/path-to-images/” form the base path to the “abc.jpg”.

1
$dg -> set_col_img("productImage", "/path-to-images/");

 
 
 

Watch Tutorial Video

Announcing phpGrid v7.6!

X