Im having two foreach loops: one is having purchase info and another one is having sales info.
what i want to print like this, here one foreach loop will hold many items for purchase and another foreach loop will hold many items for sales. i want to loop one item in purchase and one item in sales, and so on...
can anyone please suggest me how to do that
//purchase infos
foreach($purchase_array as $row){
echo "<tr>";
echo "<td>purchase</td>";
echo "<td>".$row['quantity']."</td>";
echo "<td>".$row['total']."</td>";
//if one item finished here it has to go to $sales_array foreach loop and come back to this loop after echoing one item there. so that it can be one row
}
foreach($sales_array as $row){
//sales infos
echo "<td>sales</td>";
echo "<td>".$row['bill_number']."</td>";
echo "<td>".$row['quantity']."</td>";
echo "<td>".$row['total']."</td>";
echo "</tr>";
}