Learning PHP and MySQL

Example 11-07 Left padding using the default of spaces

<?php
printf
("<pre>Space  padding  can  be  tricky  in  HTML  %5d.</pre>",  42);
?>

This code is equivalent to Example 11-5, and produces the same result, shown in Figure 11-6.

Posted by on 08/18 at 12:34 PM

Next entry: Example 11-08 Right padding with spaces

Previous entry: Example 11-06 Adding the and tags so the spaces display

<< Back to main