Good day everyone please help me to solved this code. I want to print all value of an array in php printer but only 1 only display. Im using php codeigniter framework 3. thank you in advance.
enter image description here Output: Qty Description 1 Product One
$content = "Customer " . $this->uri->segment(2) . "\n";
foreach ($orders as $order) {
$content = "Qty Description\r" . $order->Quan . " " .
" " . " " . $order->Description . "\r";
}
$printer = ("EPSON TM-U220 Receipt");
$handler = printer_open($printer);
if($handler) {
}
else {
echo "not connected";
}
printer_write($handler, $content);
printer_close($handler);
You want to concatenate
$content
.Change
to