I have a query which concat the row value.
GROUP_CONCAT(DISTINCT CONCAT(id, ' - ', name, ' - ', status) SEPARATOR ', ') AS id_name_status
I want to split it as id, name and status when in HTML. Sample code is as following
@foreach($results as $r)
<?php
$id_name_status = explode(',', $r->id_name_status);
foreach ($id_name_status as $id) {
// how can i split the string into 3 value and echo it?
}
?>
@endforeach