I have in database row services where have data Live, Text, Video separated with commas
This data is stored from checkboxes with implode function.
Now I need to explode Live Text Video individually and with if conditions to show different HTML code
<div class="icon-sm bg-black-soft bg-blur text-white rounded-circle" title="Live service"><i class="fas fa-video"></i></div>
<div class="icon-sm bg-black-soft bg-blur text-white rounded-circle" title="Text service"><i class="fas fa-align-justify"></i></div>
<div class="icon-sm bg-black-soft bg-blur text-white rounded-circle" title="Video service"><i class="fas fa-camera"></i></div>
I know what to do with if but can't get it individually.
$stmt = $con->prepare('SELECT `id`, `title`, `text`, `main_image`, `tags`, `services` FROM `news` ORDER BY `id` DESC LIMIT 8');
// Retrieve query results
$stmt->execute();
$stmt->bind_result($id, $title, $text, $naslovna, $tags, $services);
while ($stmt->fetch()) {
// Add result to accounts array
$news[] = ['id' => $id, 'title' => $title, 'text' => $text, 'naslovna' => $naslovna, 'tags' => $tags, 'services' => $services];
$services = explode(", ", $services);
}