Search
 
SCRIPT & CODE EXAMPLE
 

PHP

PHP str_pad — Pad a string to a certain length with another string

<?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"
?>
Comment

PREVIOUS NEXT
Code Example
Php :: custome route to a page with dynamic parameters wordpress 
Php :: Grab files matching particular file types in a directory 
Php :: Verifying a login cookie 
Php :: laravel dispatch execute multiple 
Php :: laravel Why using additive paramerer in Resource collection raised error 
Php :: 12 months service expiary in php 
Php :: mail php send 
Php :: dump request in ci 
Php :: rerender block in twig 
Php :: get base class name laravel 
Php :: Jolt transform specification input 
Php :: Variable "$id" is not defined by operation "GetPost". 
Php :: wc php get product variation stock 
Php :: BelongsToMany relations pivot fields are null in Livewire refresh 
Php :: laravel seeder with relationship 
Php :: generate press viewport 
Php :: Accept multiple space separated inputs 
Php :: How do I output top readers from MySql table 
Php :: codeigniter query Profiling - To enable the profiler 
Php :: RequestCriteria laravel 
Php :: mr deepfakes forum 
Php :: Anzeige von Custom Post Types in den Kategorien und Tags 
Php :: setup wp cron from external / cpanel cron service 
Php :: Ciclo for PHP ejemplos 
Php :: codeception send text in ckeditor 
Php :: php email 
Php :: what is is_null in php 
Php :: laravel query 
Php :: WP Migrate Lite 
Php :: logout php code 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =