Stuff » Codeschnipsel » PHP » String mehrfach ausgeben
Beschreibung:
Mit diesem Code wird ein String x-mal ausgegeben.Code:
<?php
$multiplier = 4; // Number of time the input string should be repeated; must be >=0
echo str_repeat("This is a string. ", $multiplier);
?>
Ausgabe:
This is a string. This is a string. This is a string. This is a string.