Name
str_pad
Synopsis
string str_pad(stringstring
, stringlength
[, stringpad
[, inttype
]])
Pads string
using
pad
until it is at least
length
characters and returns the resulting
string. By specifying type
, you can control
where the padding occurs. The following values for
type
are accepted:
| Pad to the right of
|
| Pad to the left of
|
| Pad on either side of
|
Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.