Match IMG & Keyword in Datatables PHP

Match IMG & Keyword in Datatables PHP

donnaWongdonnaWong Posts: 10Questions: 3Answers: 0

So, I'm generating some dummy data with FakerPHP

Either by generating data or manually putting it into my Datatables
Based on the BRAND of the car, id like to automatically display the right IMG

For example I generate 500 new rows of BRAND "AUDI"
and I want to auto display "AUDI.jpg"
In every column that BRAND is AUDI, display the logo picture as well.

What would be the optimal way to do this?

Example:

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    You would use columns.render for that - see example here - the flag there would be a good starting point for you,

    Colin

Sign In or Register to comment.