PHP/String/String Pad

Материал из Web эксперт
Перейти к: навигация, поиск

Pad a string to a certain length with another string

   <source lang="html4strict">

<?php

  $header = "Log Report";
  echo str_pad ($header, 20, "=+", STR_PAD_BOTH);

?>

      </source>
   
  


str_pad: 80

   <source lang="html4strict">

<?php

  echo str_pad("www.wbex.ru", 80)." is good.";

?>


      </source>