0

I am Working with EscPos thermal printing. need to include windowsprintconnector or networkprintconnector based on condition.

I tried to use

IF($conntyp == 'WINDOWS') 
    use Mike42\Escpos\PrintConnectors\WindowsPrintConnector;
else
    use Mike42\Escpos\PrintConnectors\NetworkPrintConnector;
end if;

Error : Parse error: syntax error, unexpected 'use' (T_USE)

If i use one value without any if condition it works perfectly fine

Jain
  • 33
  • 1
  • 9

0 Answers0