Horje
php number padding Code Example
php number padding

<?php
$input = "Alien";
echo str_pad($input, 10);                      // produces "Alien     "
echo str_pad($input, 10, "-=", STR_PAD_LEFT);  // produces "-=-=-Alien"
echo str_pad($input, 10, "_", STR_PAD_BOTH);   // produces "__Alien___"
echo str_pad($input,  6, "___");               // produces "Alien_"
echo str_pad($input,  3, "*");                 // produces "Alien"
?>

Source: www.php.net




Php

Related
php replace spaces with dash Code Example php replace spaces with dash Code Example
user-agent cURL php Code Example user-agent cURL php Code Example
if user logged in wordpress Code Example if user logged in wordpress Code Example
php change date format Code Example php change date format Code Example
php get first 5 characters of string Code Example php get first 5 characters of string Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
12