Hope I explain this correctly.
I have in my code
$eng[] = "All";
$eng[] = "engine_Sigma";
$eng[] = "engine_K-Series";
$eng[] = "engine_Duratec";
$eng[] = "engine_Suzuki";
$eng[] = "engine_Vauxhall";
$eng[] = "engine_Crossflow";
// query your db
$itemsq = mysqli_query($con,"SELECT * FROM `crm`.`workshop-items` LIMIT 0,100");
$items = mysqli_fetch_assoc($itemsq);
// do/while? should prob just use a while loop
do {
$enginetype = explode(":", $items['engineid']);
foreach ($enginetype as $key) {
echo "$items[wsiid] - $items[code] - $items[incvat] - $eng[$key] <br>
";
}
} while ($items = mysqli_fetch_assoc($itemsq));
However in the DB the engineid's are stored as 1:3:6 for example or even 1:2:3:4:5:6 now what I want to do is if there are multiple values and they have been split up, instead of it just echoing the first item and then echoing the data again for the next id (like this WSIID - CODE INCVAT engine_K-Series ) and so on I want to do display ( WSIID - CODE - INCVAT - engine_Sigma engine_K-Series ) if $eng is 1 & 3 ( 1:3)
Hope you can understand what I mean
Thanks guys