note 22848 deleted from function.sprintf by derick
| From: | derick@php.net | Date: | Tue, 16 Mar 2004 10:47:41 +0000 |
| Subject: | note 22848 deleted from function.sprintf by derick | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-66899@lists.php.net to get a copy of this message | ||
Note Submitter: Andrew.Wright@spamsux.atnf.csiro.au
----
To insert 30 spaces on the left of a string:
$a = "This is some text";
$b = sprintf("%30.s", $a);
To insert 30 spaces on the right of a string:
$a = "This is some text";
$b = sprintf("%-30.s", $a)."spaces before here.";