Skip to content
Advertisement

If statement to replace something in ECHO

How would I replace $rows[1] all the way on the bottom with my if statement? I’m currently trying to bind icons to my sql result. I’ve got about 100 cases and I don’t think this if statement would be very effective either, but nevertheless I want to understand how I would even implement adding these icons in the first place.

TLDR: How to make my if statement efficiently go into the last echo statement? I have about 100 cases inside my SQL query before this, is it possible to print ECHO statements in this and resolve everything?

Advertisement

Answer

Answer is that you are not able to change SQL results through an associative array. The way to get my desired result was to fix up the SQL query itself and display the image through the database.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement