Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

154
Views
Haga coincidir texto e img en Datatables PHP

Entonces, estoy generando algunos datos ficticios con FakerPHP

Ya sea generando datos o colocándolos manualmente en mis Datatables
Según la MARCA del automóvil, me gustaría mostrar automáticamente la IMG correcta

Por ejemplo genero 500 filas nuevas de MARCA "AUDI"
y quiero mostrar automáticamente "AUDI.jpg"
En cada columna que BRAND es AUDI, muestre también la imagen del logotipo.

¿Cuál sería la forma óptima de hacer esto?
Ejemplo: https://i.imgur.com/vrP16ig.png

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

puede nombrar la imagen del logotipo igual que el nombre de la marca para que en la columna de la imagen pueda mostrar la base del logotipo en el nombre de la marca como la tabla reconstruida a continuación:

 <table border="1"> <thead> <tr> <th >BRAND</th> <th >Model</th> <th >Sub model</th> <th >year</th> <th >price</th> <th >Photo</th> </tr> </thead> <tbody> <tr> <td><?php echo $row['brand']; ?></td> <td><?php echo $row['model']; ?></td> <td><?php echo $row['submodel']; ?></td> <td><?php echo $row['year']; ?></td> <td><?php echo $row['price']; ?></td> <td><img src="images/<?php echo $row['brand']; ?>.jpg" alt="" ></td> </tr> </tbody> </table>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!