I am a little confused as to what you are trying to do...
You have the solution to your question in your original code, it seems.
Can you show an example of your expected output, please? Read More
That concatenation is a bit awkward. Not sure why you need those single quotes ar the start and the end.
$message .= $item1.' ('.$item2.' x '.$item3.') '.$item4;
$message .= "$item1 ($item2 x $item3) $item4"; Read More
In my opinion...
extract() can be dangerous if you have an array key that matches a variable you already have in use in the namespace. In reality, all that extract is doing under the hood is looping through they array with a foreach loop, and using the $key part to … Read More
it all depends on your data structure... I cant possibly answer your question without knowing more about how the data looks.
From your example, your most basic data had only 4 parts, so it would be silly to iterate through only 4.
If you have, say, 50 fields, then yes … Read More
You would need to iterate over your $data array.. soo...
for ($Lup = 0; $Lup < sizeof($data); $Lup++)
Or some variance of that, depending on your need. Read More