I need to print the following data into table using for loop.I know there will be two explode.First for "|" and second for "," and after that it should be print.
PHP:
$data=750ML XYZ,750ML ABC|280,30|60,20|16800,600|12.25,25.25|205800,15150
for($i=0;$i<count($d);$i++)
{
$d2[]=explode(",",$d[$i]);
echo "<tr>";
//Suggest here
echo "</tr>"
}
Expected Output:
Goods Pkg Avg Qty Rate Total
750ML XYZ 280 60 16800 12.25 205800
750ML ABC 30 20 600 25.25 15150
I tried but it didnt work.I am confused.Please give some suggestion.Thanks in advance.