\[code\]echo '<td width="11%" class="imagetd">'. ( ( empty ($arrImageFile[$key]) ) ? " " : htmlspecialchars( is_array( $arrImageFile[$key] ) ? implode(",", $arrImageFile[$key]) : $arrImageFile[$key] ) ). '</td>' . PHP_EOL;echo '<td width="11%" class="videotd">'. ( ( empty ($arrVideoFile[$key]) ) ? " " : htmlspecialchars( is_array( $arrVideoFile[$key] ) ? implode(",", $arrVideoFile[$key]) : $arrVideoFile[$key] ) ). '</td>' . PHP_EOL;echo '<td width="11%" class="audiotd">'. ( ( empty ($arrAudioFile[$key]) ) ? " " : htmlspecialchars( is_array( $arrAudioFile[$key] ) ? implode(",", $arrAudioFile[$key]) : $arrAudioFile[$key] ) ). '</td>' . PHP_EOL;\[/code\]In the above code I have 2 table columns which depending if there are content or not display information in the table cells. Now as you can see the three columns are \[code\]Image\[/code\], \[code\]Video\[/code\] and \[code\]Audio\[/code\]. Now these columns display the relevant file names in their table cells. Below is how they are displayed:
- All Image Files contain the string \[code\]ImageFiles/\[/code\] before the filename, e.g. \[code\]ImageFiles/Lighthouse.png\[/code\]
- All Video Files contain the string \[code\]VideoFiles/\[/code\] before the filename, e.g. \[code\]VideoFiles/sample_mpeg.mp4\[/code\]
- All Audio Files contain the string \[code\]AudioFiles/\[/code\] before the filename, e.g. \[code\]AudioFiles/Music.mp3\[/code\]