Home > PHP > str_pad()

str_pad()

It pads a string to a certain length with another string

Example

<?php
echo str_pad(“phpcode”,20,”z”);
?>

Output

phpcodezzzzzzzzzzzzz

EmailFacebookLinkedInMySpaceDiggTumblrStumbleUponShare
Beginner's Guide....
Categories: PHP Tags: , ,
Comments are closed.

Switch to our mobile site