IT BS Help

Echo a PHP Variable multiple times

in Coding


$repeat_var = '<div>test name</div>';
echo str_repeat($repeat_var , 7);
Or in a for loop:

$pgLength_many = 8;
//echo each password to generate
for( $i = 1; $i &lt;= $pgLength_many; $i++ ) {
echo $my_passwords
}

$str = '';

for( $i = 1; $i <= 10; $i++ ) {
    $str .= $i . ' - ';    
}

echo $str;

0