Match IMG & Keyword in Datatables PHP
Match IMG & Keyword in Datatables PHP
donnaWong
Posts: 10Questions: 3Answers: 0
in DataTables
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
You would use
columns.render
for that - see example here - the flag there would be a good starting point for you,Colin