Guest User

Untitled

a guest
Jul 18th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.59 KB | None | 0 0
  1. <?php
  2.     $inicial = 1;
  3.     $final   = 1000;
  4.    
  5.     $valores = array();
  6.    
  7.     for($a = $inicial; $a <= $final; $a++){
  8.         for($_a = 1; $_a <= 3; $_a++){
  9.             $_str[] = $a;
  10.         }
  11.     }
  12.    
  13.     $string = implode("", $_str);
  14.     $len    = strlen($string);
  15.    
  16.     $i = 0;
  17.     while($i < $len){
  18.         $campo = @$_str[$i];
  19.        
  20.         $multiplo = (($i % 5) == 0 ? true : false);
  21.        
  22.         echo '<input type="text" name="rs" value="'.$campo.'">';
  23.        
  24.         if($multiplo){
  25.             echo '<br />';
  26.         }
  27.        
  28.         $i++;
  29.     }
Add Comment
Please, Sign In to add comment