Hi!
I've some problem with the sprintf()-Function. I want to pad a string with spaces in order to get a string-lengh of 15 characters. I tried sprintf("%15s", $string) but it doesn't work.
Can anybody help me please, in order to get grid of this problem?
Matthias
This doesn't solve the problem but I tried it too and it doesn't work for me either (running PHP4.0). It will pack a string with another character but not spaces. If you can live with packing with another character ie: dots you could try
sprintf("%'.15s", $string)
Hi!! This maybe is beacuse HTML browser's built-in parses "trims" the string I guess. Try doing something like:
sprintf("<CODE>%15s</CODE>", $string);
Maybe it works =) Sorry, but I haven't time to test it
HTH
inK