I know how to echo results that are in an array using the following
nl2br(str_replace(',', "\n", $row['column-name']))
I now have a column in which the listed items (separated by commas) are id numbers that correspond to another table.
How can I echo these results and apply the name associated to that item relative to its id?
I have tried INNER JOIN but I seem to be missing how to perform this correctly.
'SELECT * FROM Table1
INNER JOIN Table2 ON Table1.ColumnName = Table2.ColumnID
INNER JOIN Table3 ON Table1.ColumnID2 = Table3.ColumnID2 <-- This needs to apply names to the number-ids split by the nl2br
ORDER BY OrderColumn'
<span>'.nl2br(str_replace(',', "\n", $row['table3-column-name-to-replace-table1-columnID2'])).'</span>
Thanks for your help.
This is the expected result. https://drive.google.com/file/d/1ChGv9qHeJPgtwVcxbqj8ey-1RjVTah28/view?usp=sharing