I'm trying to write to a text file on php, the fields need to be a certain length for each one. Order Number is 10 characters long, order name is 5 characters, telephone is 12 characters long.
Ex:
12345 1234 123456789123
If I try:
fwrite('text.txt', '12345', 10);
fwrite('text.txt', '1234', 5);
fwrite('text.txt', '12346789123', 12);
I get: 123451234123456789123
How can I tell it to add the spaces to the specific size I need in each field.
You could use