PHP equivalent to Perl format function

Posted by Dustin Hansen on Stack Overflow See other posts from Stack Overflow or by Dustin Hansen
Published on 2010-04-05T18:51:06Z Indexed on 2010/04/05 18:53 UTC
Read the original article Hit count: 329

Filed under:
|
|
|
|

Is there an equivalent to Perl's format function in PHP? I have a client that has an old-ass okidata dotmatrix printer, and need a good way to format receipts and bills with this arcane beast.

I remember easily doing this in perl with something like:

format BILLFORMAT = 
Name: @>>>>>>>>>>>>>>>>>>>>>>    Age: @###
      $name,                          $age
.
write;

Any ideas would be much appreciated, banging my head on the wall with this one. O.o

© Stack Overflow or respective owner

Related posts about printer

Related posts about print